Aic: aikake information criterian Bic: basian
links: https://learningstatisticswithr.com/book/regression.html http://www.learnbymarketing.com/tutorials/linear-regression-in-r/ https://data.princeton.edu/R/linearModels http://www.clayford.net/statistics/using-natural-splines-in-linear-modeling/ https://stackoverflow.com/questions/24192428/what-does-the-capital-letter-i-in-r-linear-regression-formula-mean https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/s12874-019-0666-3 https://rdrr.io/cran/AICcmodavg/man/AICcmodavg-package.html
Research Question
Goal of this analysis is to answer one of my four main research questions:
-Is variation in salinity, air temperature, or pH associated with changes in abundance or reproductive effort of Fucus distichus populations in SFE?
Note: I still don’t have the air temperature data completed so I’ll be focusing on salinity and pH. I do have water temeprature so I may look at that instead of air temp for now.
Data
Field data is the mean of these values per survey. Environmental data is the median of hourly median data inbetween field survey dates.
I will be using the combined environmental and field data at all sites. Right now I have the following match-ups for field site and water data source: China Camp and Paradise Cay, EOS and Point Chauncy, Richardson Bay and Brickyard Park, and Fort Point and Horseshoe Bay. I could match Paradise Cay with EOS instead of China Camp but that’s something I need to look into more.
Data for abundace: no.fuc.q (density: total number of fucus per quadrat), cover (percent conver fucus per quadrat), no.large.fuc.q (number of large fucus per quadrat), and no.small.fuc.q (number of small fucus per quadrat)
Data for reproductive effort: covcl.repro (cover class of reproductive tissue), dw.repro (dry weight of reproductive tissue), apices.repro (number of reproductive apices), perc.ra (percent of apices that are reproductive), avg.oog (average number of oogonia) and perc.rdw (percent of dry weight that is reproductive tissue)
Data for salinity: salinity (median salinity), daily.min.sal (daily minimun salinity), daily.max.sal (daily maximum salinity), daily.sal.range (daily salinity range), daily.med.sal (daily median salinity), min.daily.sal.lt5/10/15 (number of days with a minimun daily dalinity less than 5, 10, and 15), max.daily.sal.lt5/10/15 (number of days with a maximum daily salinity less than 5, 10, and 15) and daily.sal.range.gt5/10 (number of days with a daily salinity range greater than 5 and 10)
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Breaking up main research question
Question for Karina:
-I’m not sure how to do every combination of all these variables? Should I see which ones have any significance and then try combos of those? Should I look at terms individually and then look at interactions with significate terms? –>because I’m not sure I didn’t look at a lot of interaction terms until I clarify this. For now the only interaction term I have is salinity:ph to keep it simple -Not sure if I should be looking at the lm or anova results for significance
Plot interpretation
Initial results summary:
Significate = P<0.05
Weak/slight = P<0.1
If no effect, not listed below. All variables tested are listed under “Data” section above
Not sure if I should be looking at the lm or anova results for these values. The difference between them is usually small but does make some values significant vs weakly significant
-Salinity terms with significant effect: salinity, daily minimum salinity, daily minimum salinity, daily salinity range, daily median salinity -Salinity terms with slight/weak effect: number of days with a daily minimun salinity less than 15, number of days with a daily salinity range greater than 5 -No pH terms had a significant effect on total density but different pH terms did change the level of significance of salinity on total density
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: daily salinity range -pH terms with significant effect: NONE -pH terms with slight/weak effect: daily pH range
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: salinity, daily minimum salinity, daily maximum salinity, daily salinity range, daily median salinity,
-Salinity terms with slight/weak effect: number of days with a daily minimun salinity less than 15, number of days with a daily salinity range greater than 5 -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: salinity, daily minimum salinity, daily salinity range, daily median salinity, number of days with a daily minimun salinity less than 15 -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: pH, daily minimum ph, -pH terms with slight/weak effect: daily median ph, number of days with a daily minimun ph less than 7, number of days with a daily maximum ph less than 7, number of days with a daily ph range greater than 0.5
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: NONE -pH terms with slight/weak effect: NONE
-Salinity terms with significant effect: salinity -Salinity terms with slight/weak effect: daily maximum salinity, daily salinity range -pH terms with significant effect: pH, daily maximum ph, daily median ph -pH terms with slight/weak effect: daily minimum ph, daily ph range, number of days with a daily minimun ph less than 8, -interactive term: salinity:ph (weak)
-Salinity terms with significant effect: NONE -Salinity terms with slight/weak effect: NONE -pH terms with significant effect: ph, -pH terms with slight/weak effect: number of days with a daily minimun ph less than 7, number of days with a daily maximum ph less than 7
-Salinity terms with significant effect: -Salinity terms with slight/weak effect: salinity, daily maximum salinity, daily salinity range, number of dasy with a daily minimum salinity less than 5, number of days with a daily maximum salinity less than 15 -pH terms with significant effect: ph, daily maximum ph, daily median ph -pH terms with slight/weak effect: daily minimum ph, daily ph range, number of days with a daily minimun ph less than 8, -interactive term: salinity:ph (weak)
Initial interpretation of results
(these are just initial impressions and not well articulated/thought out yet) -Salintiy has more of an impact on Fucus abundance while pH has more of an impact on fucus reproduction –>does this align with the results I see in my experiment? -Salinity impacts density but not cover, suggesting that cover is maintained even as density composition (size of thalli) changes. The composition changes but the cover remains. This is seen in my field work as well, density declined but cover remained pretty constant. -Density of small thalli are effected by changes to salinity but large thalli are not suggesting small thalli are driving the driving factor to why density is effected but not cover since larger thalli contribute more to cover than small thalli. Again,this pattern is also seen in my field work; total density pattern follows the small thalli density pattern more than large thalli. -Since small thalli are affected by salinity and large are not: This suggests that there’s some critical size that once fucus reaches it’s more tolerant to salinity changes –> suggestion for future studies -Cover class of reproductive tissue (percent cover that is reproductive tissue) is affected by salinity and I wonder if this trend is also mainly driven by the amount of small thalli? Since small thalli tend to have less reproductive tissue than large thalli -Need to look at the direction of the relationship of ph and repro (linear equation)
Set up
rm(list=ls())
library(tidyverse)
library(ggpubr)
library(scales)
library(chron)
library(plotly)
library(taRifx)
library(aweek)
library(easypackages)
library(renv)
library(here)
library(ggthemes)
library(gridExtra)
library(patchwork)
library(tidyquant)
library(recipes)
library(cranlogs)
library(knitr)
library(openair)
Read in data
#read in data
all<-read.csv(
"https://raw.githubusercontent.com/Cmwegener/thesis/master/data/environment_field/envi.field.all.csv",
header = TRUE
)
####Linear Model –> not best fit####
####Q1. Effects of salinity and pH on abundance####
Redundant from above, just placing it here for reference
Data for abundace: no.fuc.q (density: total number of fucus per quadrat), cover (percent conver fucus per quadrat), no.large.fuc.q (number of large fucus per quadrat), and no.small.fuc.q (number of small fucus per quadrat)
Data for salinity: salinity (median salinity), daily.min.sal (daily minimun salinity), daily.max.sal (daily maximum salinity), daily.sal.range (daily salinity range), daily.med.sal (daily median salinity), min.daily.sal.lt5/10/15 (number of days with a minimun daily dalinity less than 5, 10, and 15), max.daily.sal.lt5/10/15 (number of days with a maximum daily salinity less than 5, 10, and 15) and daily.sal.range.gt5/10 (number of days with a daily salinity range greater than 5 and 10)
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
####Q1.1 Effect of salinity and pH on total density#### Different salinity terms first
Effect of pH and salinity on density check median field values to see if it fits model better
lm1 <- lm(no.fuc.q ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -184.5269 5.1369 21.8195 -0.3502
summary (lm1)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.766 -24.732 -9.569 12.324 114.619
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -184.5269 1341.0810 -0.138 0.891
## salinity 5.1369 59.4977 0.086 0.932
## ph 21.8195 169.5065 0.129 0.898
## salinity:ph -0.3502 7.5249 -0.047 0.963
##
## Residual standard error: 35.05 on 41 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2028, Adjusted R-squared: 0.1445
## F-statistic: 3.478 on 3 and 41 DF, p-value: 0.02437
anova (lm1)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 12663 12663.2 10.3086 0.002575 **
## ph 1 150 149.8 0.1219 0.728743
## salinity:ph 1 3 2.7 0.0022 0.963106
## Residuals 41 50365 1228.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
See if poission with glm improves fit Anova table: Summary table: -Intercept, salinity estimate the sal slope -12.429 + pH axis –> a negative plane 3D -sal, ph, neg effect on density looking at estimate std. coefficients (w/o interaction term) -Residuals with min, 1q ect: distance between line and data point (thinking of classic lm graph) –> similar to boxplot distribution of data Effect of pH and salinity on density, interaction term removed
lm2 <- lm(no.fuc.q ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -123.937 2.368 14.160
summary (lm2)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.557 -25.080 -9.866 12.772 114.596
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -123.937 317.924 -0.390 0.69863
## salinity 2.368 0.725 3.266 0.00217 **
## ph 14.160 40.067 0.353 0.72556
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.63 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2028, Adjusted R-squared: 0.1648
## F-statistic: 5.342 on 2 and 42 DF, p-value: 0.008569
anova (lm2)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 12663 12663.2 10.5595 0.002279 **
## ph 1 150 149.8 0.1249 0.725556
## Residuals 42 50367 1199.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on density: daily minimum salinity
lm3 <- lm(no.fuc.q ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -144.448 2.473 17.432
summary (lm3)
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -45.624 -22.021 -8.684 13.224 109.527
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -144.4482 320.5812 -0.451 0.65479
## daily.min.sal 2.4728 0.6856 3.607 0.00087 ***
## ph 17.4321 40.4589 0.431 0.66894
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.37 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2504, Adjusted R-squared: 0.212
## F-statistic: 6.515 on 2 and 39 DF, p-value: 0.003621
anova (lm3)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 15174 15174.4 12.8440 0.0009288 ***
## ph 1 219 219.3 0.1856 0.6689416
## Residuals 39 46076 1181.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on density: daily maximum salinity
lm4 <- lm(no.fuc.q ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -266.06 3.09 28.90
summary (lm4)
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.199 -25.713 -8.414 10.070 113.527
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -266.062 346.094 -0.769 0.44667
## daily.max.sal 3.090 1.075 2.875 0.00651 **
## ph 28.897 43.053 0.671 0.50605
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.06 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1752, Adjusted R-squared: 0.1329
## F-statistic: 4.143 on 2 and 39 DF, p-value: 0.02337
anova (lm4)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 10185 10185.0 7.8348 0.007927 **
## ph 1 586 585.6 0.4505 0.506055
## Residuals 39 50699 1300.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on density: daily salinity range
lm5 <- lm(no.fuc.q ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 99.341 -3.002 -4.698
summary (lm5)
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.17 -24.69 -11.75 13.54 112.23
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 99.341 344.177 0.289 0.7744
## daily.sal.range -3.002 1.217 -2.468 0.0181 *
## ph -4.698 43.534 -0.108 0.9146
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.91 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1354, Adjusted R-squared: 0.09111
## F-statistic: 3.055 on 2 and 39 DF, p-value: 0.05854
anova (lm5)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 8310 8310.1 6.0984 0.01801 *
## ph 1 16 15.9 0.0116 0.91461
## Residuals 39 53144 1362.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on density: daily median salinity
lm6 <- lm(no.fuc.q ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -196.058 2.501 23.198
summary (lm6)
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.647 -24.381 -9.045 11.477 112.508
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -196.0575 328.8472 -0.596 0.5545
## daily.med.sal 2.5014 0.7464 3.351 0.0018 **
## ph 23.1979 41.3616 0.561 0.5781
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.97 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2239, Adjusted R-squared: 0.1841
## F-statistic: 5.626 on 2 and 39 DF, p-value: 0.007135
anova (lm6)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 13378 13378.4 10.9368 0.002032 **
## ph 1 385 384.8 0.3146 0.578103
## Residuals 39 47706 1223.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on density: number of days with a daily minimun salinity less than 5
lm7 <- lm(no.fuc.q ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 14.10374 0.03033 3.73310
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.779 -24.751 -14.509 5.582 119.874
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 14.10374 383.28117 0.037 0.971
## min.daily.sal.lt5 0.03033 0.46452 0.065 0.948
## ph 3.73310 48.82415 0.076 0.939
##
## Residual standard error: 38.78 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0003993, Adjusted R-squared: -0.0472
## F-statistic: 0.008389 on 2 and 42 DF, p-value: 0.9916
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 16 16.44 0.0109 0.9172
## ph 1 9 8.79 0.0058 0.9394
## Residuals 42 63155 1503.69
plot (lm7)
Effect of salinity and pH on density: number of days with a daily minimun salinity less than 10
lm8 <- lm(no.fuc.q ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -152.9242 -0.4275 25.7050
summary (lm8)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -34.99 -25.97 -13.55 10.87 113.78
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -152.9242 392.5235 -0.390 0.699
## min.daily.sal.lt10 -0.4275 0.4826 -0.886 0.381
## ph 25.7050 50.1266 0.513 0.611
##
## Residual standard error: 38.42 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01863, Adjusted R-squared: -0.0281
## F-statistic: 0.3986 on 2 and 42 DF, p-value: 0.6738
anova (lm8)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 789 788.74 0.5343 0.4689
## ph 1 388 388.21 0.2630 0.6108
## Residuals 42 62003 1476.27
plot (lm8)
Effect of salinity and pH on density: number of days with a daily minimun salinity less than 15
lm9 <- lm(no.fuc.q ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -153.9049 -0.5798 26.2061
summary (lm9)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.86 -24.15 -12.53 13.53 110.96
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -153.9049 367.1179 -0.419 0.677
## min.daily.sal.lt15 -0.5798 0.4456 -1.301 0.200
## ph 26.2061 46.8088 0.560 0.579
##
## Residual standard error: 38.02 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03904, Adjusted R-squared: -0.006717
## F-statistic: 0.8532 on 2 and 42 DF, p-value: 0.4333
anova (lm9)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 2014 2013.63 1.3930 0.2445
## ph 1 453 453.09 0.3134 0.5786
## Residuals 42 60714 1445.56
plot (lm9)
Effect of salinity and pH on density: number of days with a daily maximum salinity less than 5
lm10 <- lm(no.fuc.q ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## -7.66066 -0.03285 6.58464
summary (lm10)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.908 -25.195 -14.608 6.303 119.175
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -7.66066 394.09790 -0.019 0.985
## max.daily.sal.lt5 -0.03285 0.47589 -0.069 0.945
## ph 6.58464 50.25393 0.131 0.896
##
## Residual standard error: 38.78 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0004113, Adjusted R-squared: -0.04719
## F-statistic: 0.00864 on 2 and 42 DF, p-value: 0.9914
anova (lm10)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 0 0.17 0.0001 0.9916
## ph 1 26 25.82 0.0172 0.8964
## Residuals 42 63154 1503.68
plot (lm10)
Effect of salinity and pH on density: number of days with a daily maximum salinity less than 10
lm11 <- lm(no.fuc.q ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## -20.07430 -0.06723 8.21161
summary (lm11)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -36.988 -25.527 -14.688 6.664 118.770
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -20.07430 393.83075 -0.051 0.960
## max.daily.sal.lt10 -0.06723 0.47862 -0.140 0.889
## ph 8.21161 50.22743 0.163 0.871
##
## Residual standard error: 38.77 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0007673, Adjusted R-squared: -0.04682
## F-statistic: 0.01613 on 2 and 42 DF, p-value: 0.984
anova (lm11)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 8 8.30 0.0055 0.9411
## ph 1 40 40.18 0.0267 0.8709
## Residuals 42 63132 1503.14
plot (lm11)
Effect of salinity and pH on density: number of days with a daily maximum salinity less than 15
lm12 <- lm(no.fuc.q ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -68.795 -0.195 14.600
summary (lm12)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.330 -25.875 -14.445 7.855 117.150
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -68.7946 397.3691 -0.173 0.863
## max.daily.sal.lt15 -0.1950 0.4881 -0.400 0.692
## ph 14.5999 50.7172 0.288 0.775
##
## Residual standard error: 38.71 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.004083, Adjusted R-squared: -0.04334
## F-statistic: 0.08609 on 2 and 42 DF, p-value: 0.9177
anova (lm12)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 134 133.81 0.0893 0.7665
## ph 1 124 124.15 0.0829 0.7749
## Residuals 42 62922 1498.15
plot (lm12)
Effect of salinity and pH on density: number of days with a daily salinity range greater than 10
lm13 <- lm(no.fuc.q ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## -76.8805 -0.2548 15.7331
summary (lm13)
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -34.851 -26.997 -12.829 8.551 116.344
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -76.8805 384.9463 -0.200 0.843
## daily.sal.range.gt10 -0.2548 0.4875 -0.523 0.604
## ph 15.7331 49.1061 0.320 0.750
##
## Residual standard error: 38.65 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.00676, Adjusted R-squared: -0.04054
## F-statistic: 0.1429 on 2 and 42 DF, p-value: 0.8672
anova (lm13)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 274 273.71 0.1832 0.6708
## ph 1 153 153.37 0.1026 0.7503
## Residuals 42 62753 1494.13
plot (lm13)
Effect of salinity and pH on density: number of days with a daily salinity range greater than 5
lm14 <- lm(no.fuc.q ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## -85.4916 -0.6222 17.7824
summary (lm14)
##
## Call:
## lm(formula = no.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.50 -26.10 -11.83 12.96 110.38
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -85.4916 350.6630 -0.244 0.809
## daily.sal.range.gt5 -0.6222 0.4350 -1.430 0.160
## ph 17.7824 44.6095 0.399 0.692
##
## Residual standard error: 37.87 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04674, Adjusted R-squared: 0.001348
## F-statistic: 1.03 on 2 and 42 DF, p-value: 0.366
anova (lm14)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 2725 2725.29 1.9005 0.1753
## ph 1 228 227.86 0.1589 0.6922
## Residuals 42 60227 1433.98
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on density: daily minimum ph
lm3 <- lm(no.fuc.q ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -111.157 12.719 2.365
summary (lm3)
##
## Call:
## lm(formula = no.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.605 -25.064 -9.764 11.464 114.542
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -111.157 377.136 -0.295 0.76964
## daily.min.ph 12.719 48.204 0.264 0.79318
## salinity 2.365 0.726 3.258 0.00222 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.65 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2018, Adjusted R-squared: 0.1637
## F-statistic: 5.308 on 2 and 42 DF, p-value: 0.008808
anova (lm3)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 0 0.0 0.000 0.995557
## salinity 1 12747 12746.8 10.615 0.002225 **
## Residuals 42 50434 1200.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on density: daily maximum ph
lm4 <- lm(no.fuc.q ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -291.107 34.632 2.441
summary (lm4)
##
## Call:
## lm(formula = no.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.55 -24.21 -11.86 12.16 100.84
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -291.1068 216.4112 -1.345 0.1858
## daily.max.ph 34.6323 26.7412 1.295 0.2024
## salinity 2.4412 0.7137 3.420 0.0014 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.01 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2311, Adjusted R-squared: 0.1945
## F-statistic: 6.313 on 2 and 42 DF, p-value: 0.004007
anova (lm4)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 1073 1072.8 0.9275 0.341025
## salinity 1 13530 13530.4 11.6984 0.001404 **
## Residuals 42 48577 1156.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on density: daily ph range
lm5 <- lm(no.fuc.q ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## -11.450 -4.285 2.436
summary (lm5)
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -42.17 -20.97 -7.65 9.22 115.01
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -11.4496 17.5761 -0.651 0.51832
## daily.ph.range -4.2853 3.3174 -1.292 0.20350
## salinity 2.4359 0.7134 3.414 0.00143 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.01 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.231, Adjusted R-squared: 0.1944
## F-statistic: 6.308 on 2 and 42 DF, p-value: 0.004024
anova (lm5)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 1107 1107.1 0.957 0.333550
## salinity 1 13487 13486.5 11.658 0.001428 **
## Residuals 42 48587 1156.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on density: daily median ph
lm6 <- lm(no.fuc.q ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -239.636 28.767 2.381
summary (lm6)
##
## Call:
## lm(formula = no.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.271 -24.516 -8.035 14.396 111.682
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -239.6360 309.1487 -0.775 0.44259
## daily.med.ph 28.7666 38.9615 0.738 0.46442
## salinity 2.3814 0.7209 3.303 0.00196 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.46 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2107, Adjusted R-squared: 0.1731
## F-statistic: 5.605 on 2 and 42 DF, p-value: 0.006956
anova (lm6)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 353 353.3 0.2976 0.588299
## salinity 1 12957 12957.2 10.9124 0.001958 **
## Residuals 42 49870 1187.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on density: number of days with a daily minimun ph less than 7
lm7 <- lm(no.fuc.q ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## -9.3193 -0.2842 2.2829
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.62 -24.19 -10.48 12.34 114.32
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.3193 20.3782 -0.457 0.64980
## min.daily.ph.lt7 -0.2842 1.1325 -0.251 0.80309
## salinity 2.2829 0.7719 2.958 0.00507 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.66 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2016, Adjusted R-squared: 0.1636
## F-statistic: 5.303 on 2 and 42 DF, p-value: 0.008838
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 2234 2233.8 1.860 0.179893
## salinity 1 10505 10505.0 8.747 0.005073 **
## Residuals 42 50442 1201.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density: number of days with a daily minimun ph less than 8
lm7 <- lm(no.fuc.q ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## -11.950715 0.008093 2.350374
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.293 -24.408 -9.666 10.205 114.751
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -11.950715 19.158498 -0.624 0.53614
## min.daily.ph.lt8 0.008093 0.287905 0.028 0.97771
## salinity 2.350374 0.724336 3.245 0.00231 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.68 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2004, Adjusted R-squared: 0.1624
## F-statistic: 5.265 on 2 and 42 DF, p-value: 0.009116
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 0 0.0 0.000 0.997176
## salinity 1 12664 12664.1 10.529 0.002309 **
## Residuals 42 50516 1202.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density: number of days with a daily maximum ph less than 7
lm10 <- lm(no.fuc.q ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## -9.3193 -0.2842 2.2829
summary (lm10)
##
## Call:
## lm(formula = no.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.62 -24.19 -10.48 12.34 114.32
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.3193 20.3782 -0.457 0.64980
## max.daily.ph.lt7 -0.2842 1.1325 -0.251 0.80309
## salinity 2.2829 0.7719 2.958 0.00507 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.66 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2016, Adjusted R-squared: 0.1636
## F-statistic: 5.303 on 2 and 42 DF, p-value: 0.008838
anova (lm10)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 2234 2233.8 1.860 0.179893
## salinity 1 10505 10505.0 8.747 0.005073 **
## Residuals 42 50442 1201.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on density: number of days with a daily ph range greater than 0.5
lm13 <- lm(no.fuc.q ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## -20.4275 0.7835 2.5404
summary (lm13)
##
## Call:
## lm(formula = no.fuc.q ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.264 -23.539 -9.462 15.100 105.976
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -20.4275 20.2601 -1.008 0.31910
## daily.ph.range.gt0.5 0.7835 0.8823 0.888 0.37957
## salinity 2.5404 0.7489 3.392 0.00152 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 34.36 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.2152, Adjusted R-squared: 0.1778
## F-statistic: 5.757 on 2 and 42 DF, p-value: 0.006171
anova (lm13)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 9 8.7 0.0073 0.932104
## salinity 1 13586 13585.6 11.5072 0.001522 **
## Residuals 42 49586 1180.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q1.2 Effect of salinity and pH on percent cover#### Different salinity terms first
Effect of pH and salinity on percent cover
lm1 <- lm(cover ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = cover ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -110.4421 0.9746 17.8257 -0.1015
summary (lm1)
##
## Call:
## lm(formula = cover ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.901 -10.707 2.686 9.201 25.669
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -110.4421 576.9700 -0.191 0.849
## salinity 0.9746 25.5976 0.038 0.970
## ph 17.8257 72.9264 0.244 0.808
## salinity:ph -0.1015 3.2374 -0.031 0.975
##
## Residual standard error: 15.08 on 41 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02461, Adjusted R-squared: -0.04676
## F-statistic: 0.3448 on 3 and 41 DF, p-value: 0.7931
anova (lm1)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 53.0 53.036 0.2333 0.6317
## ph 1 181.9 181.905 0.8000 0.3763
## salinity:ph 1 0.2 0.224 0.0010 0.9751
## Residuals 41 9322.3 227.373
plot (lm1)
Effect of pH and salinity on percent cover, interaction term removed
lm2 <- lm(cover ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = cover ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -92.8748 0.1718 15.6049
summary (lm2)
##
## Call:
## lm(formula = cover ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.985 -10.714 2.776 9.240 25.666
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -92.8748 136.7776 -0.679 0.501
## salinity 0.1718 0.3119 0.551 0.585
## ph 15.6049 17.2377 0.905 0.370
##
## Residual standard error: 14.9 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02458, Adjusted R-squared: -0.02187
## F-statistic: 0.5292 on 2 and 42 DF, p-value: 0.5929
anova (lm2)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 53.0 53.036 0.2389 0.6275
## ph 1 181.9 181.905 0.8195 0.3705
## Residuals 42 9322.5 221.965
plot (lm2)
Effect and salinity and pH on percent cover: daily minimum salinity
lm3 <- lm(cover ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = cover ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -115.6212 0.3202 18.2198
summary (lm3)
##
## Call:
## lm(formula = cover ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.768 -10.390 1.473 9.378 23.411
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -115.6212 132.9446 -0.870 0.390
## daily.min.sal 0.3202 0.2843 1.126 0.267
## ph 18.2198 16.7782 1.086 0.284
##
## Residual standard error: 14.25 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05499, Adjusted R-squared: 0.006532
## F-statistic: 1.135 on 2 and 39 DF, p-value: 0.3319
anova (lm3)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 221.5 221.54 1.0904 0.3028
## ph 1 239.6 239.59 1.1792 0.2842
## Residuals 39 7923.9 203.18
plot (lm3)
Effect and salinity and pH on percent cover: daily maximum salinity
lm4 <- lm(cover ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = cover ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -88.1379 -0.1069 15.9476
summary (lm4)
##
## Call:
## lm(formula = cover ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.867 -8.030 2.629 7.618 27.056
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -88.1379 138.9217 -0.634 0.529
## daily.max.sal -0.1069 0.4314 -0.248 0.806
## ph 15.9476 17.2813 0.923 0.362
##
## Residual standard error: 14.47 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0258, Adjusted R-squared: -0.02416
## F-statistic: 0.5165 on 2 and 39 DF, p-value: 0.6007
anova (lm4)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 38.0 37.979 0.1813 0.6726
## ph 1 178.4 178.371 0.8516 0.3618
## Residuals 39 8168.7 209.453
plot (lm4)
Effect and salinity and pH on percent cover: daily salinity range
lm5 <- lm(cover ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = cover ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## -63.850 -0.984 13.233
summary (lm5)
##
## Call:
## lm(formula = cover ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.074 -5.018 2.491 7.784 22.061
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -63.8495 127.4745 -0.501 0.6193
## daily.sal.range -0.9840 0.4506 -2.184 0.0351 *
## ph 13.2333 16.1239 0.821 0.4168
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.67 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1306, Adjusted R-squared: 0.08599
## F-statistic: 2.929 on 2 and 39 DF, p-value: 0.06531
anova (lm5)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 969.0 969.01 5.1839 0.02836 *
## ph 1 125.9 125.91 0.6736 0.41679
## Residuals 39 7290.1 186.93
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on percent cover: daily median salinity
lm6 <- lm(cover ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = cover ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -111.7802 0.1878 18.0310
summary (lm6)
##
## Call:
## lm(formula = cover ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.104 -9.359 2.210 8.239 24.938
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -111.7802 135.5369 -0.825 0.415
## daily.med.sal 0.1878 0.3076 0.611 0.545
## ph 18.0310 17.0475 1.058 0.297
##
## Residual standard error: 14.42 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03351, Adjusted R-squared: -0.01606
## F-statistic: 0.676 on 2 and 39 DF, p-value: 0.5145
anova (lm6)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 48.5 48.481 0.2333 0.6318
## ph 1 232.5 232.464 1.1187 0.2967
## Residuals 39 8104.1 207.797
plot (lm6)
Effect of salinity and pH on percent cover: number of days with a daily minimun salinity less than 5
lm7 <- lm(cover ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## -36.0949 0.1483 8.7112
summary (lm7)
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.411 -11.846 2.987 8.651 25.328
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -36.0949 146.5782 -0.246 0.807
## min.daily.sal.lt5 0.1483 0.1776 0.835 0.409
## ph 8.7112 18.6718 0.467 0.643
##
## Residual standard error: 14.83 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03357, Adjusted R-squared: -0.01245
## F-statistic: 0.7295 on 2 and 42 DF, p-value: 0.4882
anova (lm7)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 273.0 272.988 1.2413 0.2716
## ph 1 47.9 47.868 0.2177 0.6432
## Residuals 42 9236.6 219.919
plot (lm7)
Effect of salinity and pH on percent cover: number of days with a daily minimun salinity less than 10
lm8 <- lm(cover ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -29.5696 0.1467 7.8372
summary (lm8)
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.972 -11.594 2.727 8.979 25.709
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -29.5696 151.6388 -0.195 0.846
## min.daily.sal.lt10 0.1467 0.1864 0.787 0.436
## ph 7.8372 19.3648 0.405 0.688
##
## Residual standard error: 14.84 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03181, Adjusted R-squared: -0.0143
## F-statistic: 0.6899 on 2 and 42 DF, p-value: 0.5072
anova (lm8)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 267.9 267.895 1.2159 0.2764
## ph 1 36.1 36.087 0.1638 0.6877
## Residuals 42 9253.5 220.321
plot (lm8)
Effect of salinity and pH on percent cover: number of days with a daily minimun salinity less than 15
lm9 <- lm(cover ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -53.4032 0.1105 10.9020
summary (lm9)
##
## Call:
## lm(formula = cover ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.009 -11.290 3.372 8.821 26.016
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -53.4032 143.6906 -0.372 0.712
## min.daily.sal.lt15 0.1105 0.1744 0.633 0.530
## ph 10.9020 18.3210 0.595 0.555
##
## Residual standard error: 14.88 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02683, Adjusted R-squared: -0.01951
## F-statistic: 0.5789 on 2 and 42 DF, p-value: 0.5649
anova (lm9)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 178.0 178.006 0.8038 0.3751
## ph 1 78.4 78.414 0.3541 0.5550
## Residuals 42 9301.1 221.454
plot (lm9)
Effect of salinity and pH on percent cover: number of days with a daily maximum salinity less than 5
lm10 <- lm(cover ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## -53.27195 0.08252 10.97750
summary (lm10)
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.704 -11.961 3.464 8.314 25.987
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -53.27195 151.59490 -0.351 0.727
## max.daily.sal.lt5 0.08252 0.18306 0.451 0.654
## ph 10.97750 19.33083 0.568 0.573
##
## Residual standard error: 14.92 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02226, Adjusted R-squared: -0.0243
## F-statistic: 0.4782 on 2 and 42 DF, p-value: 0.6232
anova (lm10)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 141.0 141.03 0.6339 0.4304
## ph 1 71.7 71.75 0.3225 0.5731
## Residuals 42 9344.7 222.49
plot (lm10)
Effect of salinity and pH on percent cover: number of days with a daily maximum salinity less than 10
lm11 <- lm(cover ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## -50.86686 0.08983 10.65914
summary (lm11)
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.864 -11.980 3.443 8.346 25.914
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -50.86686 151.45641 -0.336 0.739
## max.daily.sal.lt10 0.08983 0.18406 0.488 0.628
## ph 10.65914 19.31608 0.552 0.584
##
## Residual standard error: 14.91 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02307, Adjusted R-squared: -0.02345
## F-statistic: 0.496 on 2 and 42 DF, p-value: 0.6125
anova (lm11)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 152.8 152.823 0.6874 0.4117
## ph 1 67.7 67.696 0.3045 0.5840
## Residuals 42 9337.0 222.308
plot (lm11)
Effect of salinity and pH on percent cover: number of days with a daily maximum salinity less than 15
lm12 <- lm(cover ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -39.3514 0.1178 9.1462
summary (lm12)
##
## Call:
## lm(formula = cover ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.462 -12.122 3.162 8.527 25.652
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -39.3514 152.7899 -0.258 0.798
## max.daily.sal.lt15 0.1178 0.1877 0.628 0.534
## ph 9.1462 19.5010 0.469 0.641
##
## Residual standard error: 14.88 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02666, Adjusted R-squared: -0.01969
## F-statistic: 0.5752 on 2 and 42 DF, p-value: 0.5669
anova (lm12)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 206.1 206.102 0.9305 0.3402
## ph 1 48.7 48.722 0.2200 0.6415
## Residuals 42 9302.6 221.492
plot (lm12)
Effect of salinity and pH on percent cover: number of days with a daily salinity range greater than 10
lm13 <- lm(cover ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## -45.6667 0.1188 9.9397
summary (lm13)
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.453 -11.799 3.159 8.621 25.673
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -45.6667 148.2006 -0.308 0.759
## daily.sal.range.gt10 0.1188 0.1877 0.633 0.530
## ph 9.9397 18.9054 0.526 0.602
##
## Residual standard error: 14.88 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.02682, Adjusted R-squared: -0.01952
## F-statistic: 0.5787 on 2 and 42 DF, p-value: 0.565
anova (lm13)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 195.1 195.107 0.8810 0.3533
## ph 1 61.2 61.216 0.2764 0.6018
## Residuals 42 9301.1 221.456
plot (lm13)
Effect of salinity and pH on percent cover: number of days with a daily salinity range greater than 5
lm14 <- lm(cover ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## -85.53608 -0.01366 15.22127
summary (lm14)
##
## Call:
## lm(formula = cover ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.370 -10.375 3.372 8.326 27.130
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -85.53608 138.44943 -0.618 0.540
## daily.sal.range.gt5 -0.01366 0.17174 -0.080 0.937
## ph 15.22127 17.61282 0.864 0.392
##
## Residual standard error: 14.95 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01768, Adjusted R-squared: -0.0291
## F-statistic: 0.378 on 2 and 42 DF, p-value: 0.6875
anova (lm14)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 2.0 2.034 0.0091 0.9245
## ph 1 167.0 166.951 0.7469 0.3924
## Residuals 42 9388.5 223.535
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent cover: daily minimum ph
lm3 <- lm(cover ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = cover ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -226.4095 32.9061 0.1914
summary (lm3)
##
## Call:
## lm(formula = cover ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.152 -8.640 2.190 8.433 26.218
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -226.4095 158.8270 -1.426 0.161
## daily.min.ph 32.9061 20.3006 1.621 0.113
## salinity 0.1914 0.3057 0.626 0.535
##
## Residual standard error: 14.59 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.0641, Adjusted R-squared: 0.01953
## F-statistic: 1.438 on 2 and 42 DF, p-value: 0.2488
anova (lm3)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 529.2 529.17 2.4847 0.1225
## salinity 1 83.4 83.44 0.3918 0.5347
## Residuals 42 8944.9 212.97
plot (lm3)
Effect salinity and pH on percent cover: daily maximum ph
lm4 <- lm(cover ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = cover ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -101.1884 16.3572 0.1951
summary (lm4)
##
## Call:
## lm(formula = cover ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.792 -10.444 2.664 9.191 25.666
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -101.1884 93.5205 -1.082 0.285
## daily.max.ph 16.3572 11.5560 1.415 0.164
## salinity 0.1951 0.3084 0.632 0.531
##
## Residual standard error: 14.7 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.05083, Adjusted R-squared: 0.00563
## F-statistic: 1.125 on 2 and 42 DF, p-value: 0.3344
anova (lm4)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 399.4 399.39 1.8491 0.1811
## salinity 1 86.4 86.40 0.4000 0.5305
## Residuals 42 9071.7 215.99
plot (lm4)
Effect of salinity and pH on percent cover: daily ph range
lm5 <- lm(cover ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = cover ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 30.9302 -2.4813 0.2018
summary (lm5)
##
## Call:
## lm(formula = cover ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.605 -7.993 1.361 10.018 24.691
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.9302 7.5043 4.122 0.000173 ***
## daily.ph.range -2.4813 1.4164 -1.752 0.087094 .
## salinity 0.2018 0.3046 0.662 0.511364
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 14.52 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.07327, Adjusted R-squared: 0.02914
## F-statistic: 1.66 on 2 and 42 DF, p-value: 0.2023
anova (lm5)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 607.7 607.74 2.8819 0.09698 .
## salinity 1 92.5 92.52 0.4387 0.51136
## Residuals 42 8857.2 210.89
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on percent cover: daily median ph
lm6 <- lm(cover ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = cover ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -126.5690 19.8597 0.1736
summary (lm6)
##
## Call:
## lm(formula = cover ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.383 -9.539 2.907 8.866 25.690
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -126.5690 132.7535 -0.953 0.346
## daily.med.ph 19.8597 16.7307 1.187 0.242
## salinity 0.1736 0.3096 0.561 0.578
##
## Residual standard error: 14.8 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.03783, Adjusted R-squared: -0.00799
## F-statistic: 0.8256 on 2 and 42 DF, p-value: 0.4449
anova (lm6)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 292.6 292.645 1.3366 0.2542
## salinity 1 68.9 68.896 0.3147 0.5778
## Residuals 42 9195.9 218.951
plot (lm6)
Effect salinity and pH on percent cover: number of days with a daily minimun ph less than 7
lm7 <- lm(cover ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 30.87373 -0.01436 0.14869
summary (lm7)
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.089 -10.410 2.387 10.749 25.942
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.87373 8.84568 3.490 0.00115 **
## min.daily.ph.lt7 -0.01436 0.49161 -0.029 0.97683
## salinity 0.14869 0.33505 0.444 0.65948
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.04 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.005569, Adjusted R-squared: -0.04178
## F-statistic: 0.1176 on 2 and 42 DF, p-value: 0.8893
anova (lm7)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 8.7 8.662 0.0383 0.8458
## salinity 1 44.6 44.567 0.1969 0.6595
## Residuals 42 9504.2 226.291
plot (lm7)
Effect salinity and pH on percent cover: number of days with a daily minimun ph less than 8
lm7 <- lm(cover ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 26.1581 0.1951 0.1569
summary (lm7)
##
## Call:
## lm(formula = cover ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.609 -8.827 4.655 9.818 24.726
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 26.1581 8.0651 3.243 0.00232 **
## min.daily.ph.lt8 0.1951 0.1212 1.610 0.11493
## salinity 0.1569 0.3049 0.515 0.60959
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 14.6 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.06334, Adjusted R-squared: 0.01874
## F-statistic: 1.42 on 2 and 42 DF, p-value: 0.253
anova (lm7)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 549.0 548.97 2.5756 0.1160
## salinity 1 56.4 56.42 0.2647 0.6096
## Residuals 42 8952.1 213.14
plot (lm7)
Effect salinity and pH on percent cover: number of days with a daily maximum ph less than 7
lm10 <- lm(cover ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = cover ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 30.87373 -0.01436 0.14869
summary (lm10)
##
## Call:
## lm(formula = cover ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.089 -10.410 2.387 10.749 25.942
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.87373 8.84568 3.490 0.00115 **
## max.daily.ph.lt7 -0.01436 0.49161 -0.029 0.97683
## salinity 0.14869 0.33505 0.444 0.65948
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.04 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.005569, Adjusted R-squared: -0.04178
## F-statistic: 0.1176 on 2 and 42 DF, p-value: 0.8893
anova (lm10)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 8.7 8.662 0.0383 0.8458
## salinity 1 44.6 44.567 0.1969 0.6595
## Residuals 42 9504.2 226.291
plot (lm10)
Effect salinity and pH on percent cover: number of days with a daily ph range greater than 0.5
lm13 <- lm(cover ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = cover ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 29.4557 0.1170 0.1805
summary (lm13)
##
## Call:
## lm(formula = cover ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.186 -10.680 1.816 11.369 26.223
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.4557 8.8603 3.324 0.00185 **
## daily.ph.range.gt0.5 0.1170 0.3859 0.303 0.76314
## salinity 0.1805 0.3275 0.551 0.58445
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.03 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.007723, Adjusted R-squared: -0.03953
## F-statistic: 0.1634 on 2 and 42 DF, p-value: 0.8498
anova (lm13)
## Analysis of Variance Table
##
## Response: cover
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 5.2 5.220 0.0231 0.8799
## salinity 1 68.6 68.591 0.3038 0.5845
## Residuals 42 9483.7 225.801
plot (lm13)
####Q1.3 Effect of salinity and pH on density of large thalli#### Different salinity terms first
Effect of pH and salinity on density of small thalli
lm1 <- lm(no.small.fuc.q ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 99.394 -9.315 -15.294 1.496
summary (lm1)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.967 -23.684 -7.834 11.576 105.023
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 99.394 1355.640 0.073 0.942
## salinity -9.315 61.497 -0.151 0.880
## ph -15.294 171.383 -0.089 0.929
## salinity:ph 1.496 7.782 0.192 0.849
##
## Residual standard error: 34.06 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2411, Adjusted R-squared: 0.1812
## F-statistic: 4.024 on 3 and 38 DF, p-value: 0.014
anova (lm1)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13787 13787.0 11.8856 0.001397 **
## ph 1 172 172.2 0.1484 0.702198
## salinity:ph 1 43 42.9 0.0370 0.848559
## Residuals 38 44079 1160.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on density of small thalli, interaction term removed
lm2 <- lm(no.small.fuc.q ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -152.793 2.508 16.598
summary (lm2)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.326 -23.908 -5.857 10.830 105.180
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -152.7933 338.2143 -0.452 0.65394
## salinity 2.5082 0.7141 3.513 0.00114 **
## ph 16.5983 42.5489 0.390 0.69859
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.64 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2403, Adjusted R-squared: 0.2014
## F-statistic: 6.169 on 2 and 39 DF, p-value: 0.0047
anova (lm2)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13787 13787.0 12.1865 0.001212 **
## ph 1 172 172.2 0.1522 0.698585
## Residuals 39 44122 1131.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on density of small thalli: daily minimum salinity
lm3 <- lm(no.small.fuc.q ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -183.477 2.608 21.225
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -44.490 -21.038 -6.786 13.881 99.876
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -183.4772 340.9496 -0.538 0.593795
## daily.min.sal 2.6080 0.6751 3.863 0.000449 ***
## ph 21.2245 42.9501 0.494 0.624190
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.25 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.293, Adjusted R-squared: 0.2538
## F-statistic: 7.461 on 2 and 36 DF, p-value: 0.001946
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 16230 16230.4 14.6784 0.0004918 ***
## ph 1 270 270.0 0.2442 0.6241902
## Residuals 36 39806 1105.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on density of small thalli: daily maximum salinity
lm4 <- lm(no.small.fuc.q ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -306.065 3.304 32.422
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.241 -27.190 -6.240 9.158 104.202
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -306.065 372.207 -0.822 0.41632
## daily.max.sal 3.304 1.068 3.094 0.00381 **
## ph 32.422 46.226 0.701 0.48758
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 35.15 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2101, Adjusted R-squared: 0.1662
## F-statistic: 4.786 on 2 and 36 DF, p-value: 0.01435
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 11219 11219.5 9.0806 0.004709 **
## ph 1 608 607.8 0.4919 0.487579
## Residuals 36 44479 1235.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on density of small thalli: daily salinity range
lm5 <- lm(no.small.fuc.q ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 117.659 -3.064 -7.809
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.022 -25.359 -9.762 18.193 103.312
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 117.659 369.866 0.318 0.7522
## daily.sal.range -3.064 1.213 -2.526 0.0161 *
## ph -7.809 46.805 -0.167 0.8684
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.45 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1505, Adjusted R-squared: 0.1033
## F-statistic: 3.19 on 2 and 36 DF, p-value: 0.05303
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 8440 8439.5 6.3521 0.0163 *
## ph 1 37 37.0 0.0278 0.8684
## Residuals 36 47830 1328.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on density of small thalli: daily median salinity
lm6 <- lm(no.small.fuc.q ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -235.012 2.653 26.894
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.445 -22.694 -6.716 10.877 102.999
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -235.0118 351.1338 -0.669 0.50758
## daily.med.sal 2.6530 0.7377 3.597 0.00096 ***
## ph 26.8938 44.0903 0.610 0.54571
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.92 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2643, Adjusted R-squared: 0.2235
## F-statistic: 6.468 on 2 and 36 DF, p-value: 0.003983
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 14456 14455.6 12.5632 0.001112 **
## ph 1 428 428.1 0.3721 0.545712
## Residuals 36 41423 1150.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 5
lm7 <- lm(no.small.fuc.q ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 67.3390 0.1074 -3.9749
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.640 -24.536 -19.983 9.136 112.055
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 67.3390 407.1119 0.165 0.869
## min.daily.sal.lt5 0.1074 0.4664 0.230 0.819
## ph -3.9749 51.7961 -0.077 0.939
##
## Residual standard error: 38.56 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.001359, Adjusted R-squared: -0.04985
## F-statistic: 0.02653 on 2 and 39 DF, p-value: 0.9738
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 70 70.15 0.0472 0.8292
## ph 1 9 8.76 0.0059 0.9392
## Residuals 39 58002 1487.23
plot (lm7)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 10
lm8 <- lm(no.small.fuc.q ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -99.199 -0.385 17.979
summary (lm8)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.80 -25.43 -20.08 15.77 105.65
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -99.1986 416.3303 -0.238 0.813
## min.daily.sal.lt10 -0.3850 0.4857 -0.793 0.433
## ph 17.9788 53.0959 0.339 0.737
##
## Residual standard error: 38.28 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01586, Adjusted R-squared: -0.03461
## F-statistic: 0.3142 on 2 and 39 DF, p-value: 0.7322
anova (lm8)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 753 753.01 0.5138 0.4778
## ph 1 168 168.05 0.1147 0.7367
## Residuals 39 57160 1465.64
plot (lm8)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 15
lm9 <- lm(no.small.fuc.q ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -94.2296 -0.5522 17.7609
summary (lm9)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -34.41 -25.91 -19.30 18.34 102.57
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -94.2296 390.5885 -0.241 0.811
## min.daily.sal.lt15 -0.5522 0.4506 -1.225 0.228
## ph 17.7609 49.7215 0.357 0.723
##
## Residual standard error: 37.87 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03707, Adjusted R-squared: -0.01231
## F-statistic: 0.7508 on 2 and 39 DF, p-value: 0.4787
anova (lm9)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 1970 1970.27 1.3739 0.2482
## ph 1 183 182.98 0.1276 0.7229
## Residuals 39 55928 1434.05
plot (lm9)
Effect of salinity and pH on percent no.small.fuc.q: number of days with a daily maximum salinity less than 5
lm10 <- lm(no.small.fuc.q ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 60.18350 0.07026 -3.01930
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.805 -24.494 -20.035 9.795 111.699
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 60.18350 418.22060 0.144 0.886
## max.daily.sal.lt5 0.07026 0.47745 0.147 0.884
## ph -3.01930 53.26598 -0.057 0.955
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0005555, Adjusted R-squared: -0.0507
## F-statistic: 0.01084 on 2 and 39 DF, p-value: 0.9892
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 27 27.48 0.0185 0.8926
## ph 1 5 4.78 0.0032 0.9551
## Residuals 39 58049 1488.43
plot (lm10)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 10
lm11 <- lm(no.small.fuc.q ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 44.71116 0.02656 -0.99326
summary (lm11)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.89 -24.64 -19.91 10.43 111.21
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 44.71116 417.96578 0.107 0.915
## max.daily.sal.lt10 0.02656 0.48049 0.055 0.956
## ph -0.99326 53.24028 -0.019 0.985
##
## Residual standard error: 38.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 7.888e-05, Adjusted R-squared: -0.0512
## F-statistic: 0.001538 on 2 and 39 DF, p-value: 0.9985
anova (lm11)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 4 4.06 0.0027 0.9586
## ph 1 1 0.52 0.0003 0.9852
## Residuals 39 58076 1489.14
plot (lm11)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 15
lm12 <- lm(no.small.fuc.q ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -9.3238 -0.1244 6.0992
summary (lm12)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.20 -25.88 -18.84 12.47 109.36
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.3238 421.6289 -0.022 0.982
## max.daily.sal.lt15 -0.1244 0.4906 -0.254 0.801
## ph 6.0992 53.7459 0.113 0.910
##
## Residual standard error: 38.56 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.001646, Adjusted R-squared: -0.04955
## F-statistic: 0.03216 on 2 and 39 DF, p-value: 0.9684
anova (lm12)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 76 76.47 0.0514 0.8218
## ph 1 19 19.15 0.0129 0.9102
## Residuals 39 57985 1486.80
plot (lm12)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 10
lm13 <- lm(no.small.fuc.q ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## -14.573 -0.171 6.849
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -34.94 -25.87 -19.11 13.15 108.73
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -14.5733 408.7095 -0.036 0.972
## daily.sal.range.gt10 -0.1710 0.4915 -0.348 0.730
## ph 6.8493 52.0640 0.132 0.896
##
## Residual standard error: 38.53 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.003094, Adjusted R-squared: -0.04803
## F-statistic: 0.06051 on 2 and 39 DF, p-value: 0.9414
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 154 153.99 0.1037 0.7491
## ph 1 26 25.69 0.0173 0.8960
## Residuals 39 57901 1484.65
plot (lm13)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 5
lm14 <- lm(no.small.fuc.q ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## -47.2864 -0.5375 11.8989
summary (lm14)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.04 -26.93 -17.67 17.34 103.00
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -47.2864 382.4803 -0.124 0.902
## daily.sal.range.gt5 -0.5375 0.4471 -1.202 0.237
## ph 11.8989 48.6295 0.245 0.808
##
## Residual standard error: 37.9 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03573, Adjusted R-squared: -0.01372
## F-statistic: 0.7226 on 2 and 39 DF, p-value: 0.4919
anova (lm14)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 1989 1989.44 1.3854 0.2463
## ph 1 86 85.98 0.0599 0.8080
## Residuals 39 56006 1436.04
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent density of small thalli: daily minimum ph
lm3 <- lm(no.small.fuc.q ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -13.6056 -0.9499 2.4765
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.194 -24.868 -6.745 11.281 105.344
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -13.6056 370.3267 -0.037 0.97088
## daily.min.ph -0.9499 47.3143 -0.020 0.98408
## salinity 2.4765 0.7135 3.471 0.00128 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.7 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2374, Adjusted R-squared: 0.1983
## F-statistic: 6.07 on 2 and 39 DF, p-value: 0.00507
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 105 105.1 0.0926 0.762573
## salinity 1 13682 13682.3 12.0471 0.001282 **
## Residuals 39 44294 1135.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on density of small thalli: daily maximum ph
lm4 <- lm(no.small.fuc.q ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -341.122 39.658 2.602
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.381 -23.622 -7.539 11.878 89.092
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -341.1220 217.0709 -1.571 0.124151
## daily.max.ph 39.6584 26.8116 1.479 0.147134
## salinity 2.6019 0.6971 3.733 0.000604 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 32.79 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2779, Adjusted R-squared: 0.2409
## F-statistic: 7.504 on 2 and 39 DF, p-value: 0.001749
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 1156 1156.3 1.0752 0.3061523
## salinity 1 14984 14983.5 13.9328 0.0006035 ***
## Residuals 39 41941 1075.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on density of small thalli: daily ph range
lm5 <- lm(no.small.fuc.q ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## -20.804 -3.688 2.556
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.62 -22.73 -3.88 10.88 105.48
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -20.804 17.221 -1.208 0.234280
## daily.ph.range -3.688 3.239 -1.139 0.261816
## salinity 2.556 0.703 3.636 0.000799 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.15 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2619, Adjusted R-squared: 0.2241
## F-statistic: 6.92 on 2 and 39 DF, p-value: 0.00268
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 679 679.0 0.6177 0.4366425
## salinity 1 14533 14533.0 13.2214 0.0007989 ***
## Residuals 39 42869 1099.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on density of small thalli: daily median ph
lm6 <- lm(no.small.fuc.q ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -274.633 31.976 2.527
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.495 -23.717 -7.765 11.459 101.857
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -274.6333 311.9059 -0.881 0.383982
## daily.med.ph 31.9756 39.2661 0.814 0.420400
## salinity 2.5270 0.7078 3.570 0.000965 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.42 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2501, Adjusted R-squared: 0.2117
## F-statistic: 6.504 on 2 and 39 DF, p-value: 0.00365
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 291 291.1 0.2607 0.6125424
## salinity 1 14236 14236.4 12.7480 0.0009653 ***
## Residuals 39 43553 1116.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 7
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## -17.9249 -0.3602 2.3933
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.431 -25.043 -7.569 12.120 104.758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -17.9249 19.9066 -0.900 0.37341
## min.daily.ph.lt7 -0.3602 1.1042 -0.326 0.74603
## salinity 2.3933 0.7559 3.166 0.00299 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.65 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2394, Adjusted R-squared: 0.2004
## F-statistic: 6.139 on 2 and 39 DF, p-value: 0.004808
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 2552 2551.9 2.253 0.141407
## salinity 1 11356 11355.6 10.026 0.002994 **
## Residuals 39 44174 1132.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 8
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## -21.63396 0.02606 2.47772
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.627 -24.759 -6.982 11.226 105.359
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -21.63396 18.70568 -1.157 0.25449
## min.daily.ph.lt8 0.02606 0.28599 0.091 0.92786
## salinity 2.47772 0.71106 3.485 0.00123 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.7 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2375, Adjusted R-squared: 0.1984
## F-statistic: 6.075 on 2 and 39 DF, p-value: 0.00505
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 9 9.2 0.0081 0.928714
## salinity 1 13787 13787.2 12.1419 0.001234 **
## Residuals 39 44285 1135.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily maximum ph less than 7
lm10 <- lm(no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## -17.9249 -0.3602 2.3933
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.431 -25.043 -7.569 12.120 104.758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -17.9249 19.9066 -0.900 0.37341
## max.daily.ph.lt7 -0.3602 1.1042 -0.326 0.74603
## salinity 2.3933 0.7559 3.166 0.00299 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.65 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2394, Adjusted R-squared: 0.2004
## F-statistic: 6.139 on 2 and 39 DF, p-value: 0.004808
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 2552 2551.9 2.253 0.141407
## salinity 1 11356 11355.6 10.026 0.002994 **
## Residuals 39 44174 1132.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on density of small thalli: number of days with a daily ph range greater than 0.5
lm13 <- lm(no.small.fuc.q ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## -32.0043 0.9839 2.7283
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.198 -22.623 -9.266 14.220 94.110
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -32.0043 19.8146 -1.615 0.114333
## daily.ph.range.gt0.5 0.9839 0.8777 1.121 0.269188
## salinity 2.7283 0.7348 3.713 0.000639 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.17 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2612, Adjusted R-squared: 0.2233
## F-statistic: 6.893 on 2 and 39 DF, p-value: 0.002732
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 0 0.1 0.0001 0.9927205
## salinity 1 15169 15169.3 13.7865 0.0006391 ***
## Residuals 39 42912 1100.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q1.4 Effect of salinity and pH on desnity of small thalli#### Different salinity terms first
Effect of pH and salinity on density of small thalli
lm1 <- lm(no.small.fuc.q ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 99.394 -9.315 -15.294 1.496
summary (lm1)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.967 -23.684 -7.834 11.576 105.023
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 99.394 1355.640 0.073 0.942
## salinity -9.315 61.497 -0.151 0.880
## ph -15.294 171.383 -0.089 0.929
## salinity:ph 1.496 7.782 0.192 0.849
##
## Residual standard error: 34.06 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2411, Adjusted R-squared: 0.1812
## F-statistic: 4.024 on 3 and 38 DF, p-value: 0.014
anova (lm1)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13787 13787.0 11.8856 0.001397 **
## ph 1 172 172.2 0.1484 0.702198
## salinity:ph 1 43 42.9 0.0370 0.848559
## Residuals 38 44079 1160.0
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on density of small thalli, interaction term removed
lm2 <- lm(no.small.fuc.q ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## -152.793 2.508 16.598
summary (lm2)
##
## Call:
## lm(formula = no.small.fuc.q ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.326 -23.908 -5.857 10.830 105.180
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -152.7933 338.2143 -0.452 0.65394
## salinity 2.5082 0.7141 3.513 0.00114 **
## ph 16.5983 42.5489 0.390 0.69859
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.64 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2403, Adjusted R-squared: 0.2014
## F-statistic: 6.169 on 2 and 39 DF, p-value: 0.0047
anova (lm2)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 13787 13787.0 12.1865 0.001212 **
## ph 1 172 172.2 0.1522 0.698585
## Residuals 39 44122 1131.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on density of small thalli: daily minimum salinity
lm3 <- lm(no.small.fuc.q ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## -183.477 2.608 21.225
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -44.490 -21.038 -6.786 13.881 99.876
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -183.4772 340.9496 -0.538 0.593795
## daily.min.sal 2.6080 0.6751 3.863 0.000449 ***
## ph 21.2245 42.9501 0.494 0.624190
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.25 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.293, Adjusted R-squared: 0.2538
## F-statistic: 7.461 on 2 and 36 DF, p-value: 0.001946
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 16230 16230.4 14.6784 0.0004918 ***
## ph 1 270 270.0 0.2442 0.6241902
## Residuals 36 39806 1105.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on density of small thalli: daily maximum salinity
lm4 <- lm(no.small.fuc.q ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## -306.065 3.304 32.422
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.241 -27.190 -6.240 9.158 104.202
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -306.065 372.207 -0.822 0.41632
## daily.max.sal 3.304 1.068 3.094 0.00381 **
## ph 32.422 46.226 0.701 0.48758
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 35.15 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2101, Adjusted R-squared: 0.1662
## F-statistic: 4.786 on 2 and 36 DF, p-value: 0.01435
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 11219 11219.5 9.0806 0.004709 **
## ph 1 608 607.8 0.4919 0.487579
## Residuals 36 44479 1235.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on density of small thalli: daily salinity range
lm5 <- lm(no.small.fuc.q ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 117.659 -3.064 -7.809
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.022 -25.359 -9.762 18.193 103.312
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 117.659 369.866 0.318 0.7522
## daily.sal.range -3.064 1.213 -2.526 0.0161 *
## ph -7.809 46.805 -0.167 0.8684
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.45 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1505, Adjusted R-squared: 0.1033
## F-statistic: 3.19 on 2 and 36 DF, p-value: 0.05303
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 8440 8439.5 6.3521 0.0163 *
## ph 1 37 37.0 0.0278 0.8684
## Residuals 36 47830 1328.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on density of small thalli: daily median salinity
lm6 <- lm(no.small.fuc.q ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## -235.012 2.653 26.894
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.445 -22.694 -6.716 10.877 102.999
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -235.0118 351.1338 -0.669 0.50758
## daily.med.sal 2.6530 0.7377 3.597 0.00096 ***
## ph 26.8938 44.0903 0.610 0.54571
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.92 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2643, Adjusted R-squared: 0.2235
## F-statistic: 6.468 on 2 and 36 DF, p-value: 0.003983
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 14456 14455.6 12.5632 0.001112 **
## ph 1 428 428.1 0.3721 0.545712
## Residuals 36 41423 1150.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 5
lm7 <- lm(no.small.fuc.q ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 67.3390 0.1074 -3.9749
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.640 -24.536 -19.983 9.136 112.055
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 67.3390 407.1119 0.165 0.869
## min.daily.sal.lt5 0.1074 0.4664 0.230 0.819
## ph -3.9749 51.7961 -0.077 0.939
##
## Residual standard error: 38.56 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.001359, Adjusted R-squared: -0.04985
## F-statistic: 0.02653 on 2 and 39 DF, p-value: 0.9738
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 70 70.15 0.0472 0.8292
## ph 1 9 8.76 0.0059 0.9392
## Residuals 39 58002 1487.23
plot (lm7)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 10
lm8 <- lm(no.small.fuc.q ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## -99.199 -0.385 17.979
summary (lm8)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -31.80 -25.43 -20.08 15.77 105.65
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -99.1986 416.3303 -0.238 0.813
## min.daily.sal.lt10 -0.3850 0.4857 -0.793 0.433
## ph 17.9788 53.0959 0.339 0.737
##
## Residual standard error: 38.28 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01586, Adjusted R-squared: -0.03461
## F-statistic: 0.3142 on 2 and 39 DF, p-value: 0.7322
anova (lm8)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 753 753.01 0.5138 0.4778
## ph 1 168 168.05 0.1147 0.7367
## Residuals 39 57160 1465.64
plot (lm8)
Effect of salinity and pH on density of small thalli: number of days with a daily minimun salinity less than 15
lm9 <- lm(no.small.fuc.q ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## -94.2296 -0.5522 17.7609
summary (lm9)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -34.41 -25.91 -19.30 18.34 102.57
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -94.2296 390.5885 -0.241 0.811
## min.daily.sal.lt15 -0.5522 0.4506 -1.225 0.228
## ph 17.7609 49.7215 0.357 0.723
##
## Residual standard error: 37.87 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03707, Adjusted R-squared: -0.01231
## F-statistic: 0.7508 on 2 and 39 DF, p-value: 0.4787
anova (lm9)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 1970 1970.27 1.3739 0.2482
## ph 1 183 182.98 0.1276 0.7229
## Residuals 39 55928 1434.05
plot (lm9)
Effect of salinity and pH on percent no.small.fuc.q: number of days with a daily maximum salinity less than 5
lm10 <- lm(no.small.fuc.q ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 60.18350 0.07026 -3.01930
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.805 -24.494 -20.035 9.795 111.699
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 60.18350 418.22060 0.144 0.886
## max.daily.sal.lt5 0.07026 0.47745 0.147 0.884
## ph -3.01930 53.26598 -0.057 0.955
##
## Residual standard error: 38.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0005555, Adjusted R-squared: -0.0507
## F-statistic: 0.01084 on 2 and 39 DF, p-value: 0.9892
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 27 27.48 0.0185 0.8926
## ph 1 5 4.78 0.0032 0.9551
## Residuals 39 58049 1488.43
plot (lm10)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 10
lm11 <- lm(no.small.fuc.q ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 44.71116 0.02656 -0.99326
summary (lm11)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -33.89 -24.64 -19.91 10.43 111.21
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 44.71116 417.96578 0.107 0.915
## max.daily.sal.lt10 0.02656 0.48049 0.055 0.956
## ph -0.99326 53.24028 -0.019 0.985
##
## Residual standard error: 38.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 7.888e-05, Adjusted R-squared: -0.0512
## F-statistic: 0.001538 on 2 and 39 DF, p-value: 0.9985
anova (lm11)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 4 4.06 0.0027 0.9586
## ph 1 1 0.52 0.0003 0.9852
## Residuals 39 58076 1489.14
plot (lm11)
Effect of salinity and pH on density of small thalli: number of days with a daily maximum salinity less than 15
lm12 <- lm(no.small.fuc.q ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## -9.3238 -0.1244 6.0992
summary (lm12)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -35.20 -25.88 -18.84 12.47 109.36
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.3238 421.6289 -0.022 0.982
## max.daily.sal.lt15 -0.1244 0.4906 -0.254 0.801
## ph 6.0992 53.7459 0.113 0.910
##
## Residual standard error: 38.56 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.001646, Adjusted R-squared: -0.04955
## F-statistic: 0.03216 on 2 and 39 DF, p-value: 0.9684
anova (lm12)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 76 76.47 0.0514 0.8218
## ph 1 19 19.15 0.0129 0.9102
## Residuals 39 57985 1486.80
plot (lm12)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 10
lm13 <- lm(no.small.fuc.q ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## -14.573 -0.171 6.849
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -34.94 -25.87 -19.11 13.15 108.73
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -14.5733 408.7095 -0.036 0.972
## daily.sal.range.gt10 -0.1710 0.4915 -0.348 0.730
## ph 6.8493 52.0640 0.132 0.896
##
## Residual standard error: 38.53 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.003094, Adjusted R-squared: -0.04803
## F-statistic: 0.06051 on 2 and 39 DF, p-value: 0.9414
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 154 153.99 0.1037 0.7491
## ph 1 26 25.69 0.0173 0.8960
## Residuals 39 57901 1484.65
plot (lm13)
Effect of salinity and pH on density of small thalli: number of days with a daily salinity range greater than 5
lm14 <- lm(no.small.fuc.q ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## -47.2864 -0.5375 11.8989
summary (lm14)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.04 -26.93 -17.67 17.34 103.00
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -47.2864 382.4803 -0.124 0.902
## daily.sal.range.gt5 -0.5375 0.4471 -1.202 0.237
## ph 11.8989 48.6295 0.245 0.808
##
## Residual standard error: 37.9 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03573, Adjusted R-squared: -0.01372
## F-statistic: 0.7226 on 2 and 39 DF, p-value: 0.4919
anova (lm14)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 1989 1989.44 1.3854 0.2463
## ph 1 86 85.98 0.0599 0.8080
## Residuals 39 56006 1436.04
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent density of small thalli: daily minimum ph
lm3 <- lm(no.small.fuc.q ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -13.6056 -0.9499 2.4765
summary (lm3)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.194 -24.868 -6.745 11.281 105.344
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -13.6056 370.3267 -0.037 0.97088
## daily.min.ph -0.9499 47.3143 -0.020 0.98408
## salinity 2.4765 0.7135 3.471 0.00128 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.7 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2374, Adjusted R-squared: 0.1983
## F-statistic: 6.07 on 2 and 39 DF, p-value: 0.00507
anova (lm3)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 105 105.1 0.0926 0.762573
## salinity 1 13682 13682.3 12.0471 0.001282 **
## Residuals 39 44294 1135.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on density of small thalli: daily maximum ph
lm4 <- lm(no.small.fuc.q ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## -341.122 39.658 2.602
summary (lm4)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.381 -23.622 -7.539 11.878 89.092
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -341.1220 217.0709 -1.571 0.124151
## daily.max.ph 39.6584 26.8116 1.479 0.147134
## salinity 2.6019 0.6971 3.733 0.000604 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 32.79 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2779, Adjusted R-squared: 0.2409
## F-statistic: 7.504 on 2 and 39 DF, p-value: 0.001749
anova (lm4)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 1156 1156.3 1.0752 0.3061523
## salinity 1 14984 14983.5 13.9328 0.0006035 ***
## Residuals 39 41941 1075.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on density of small thalli: daily ph range
lm5 <- lm(no.small.fuc.q ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## -20.804 -3.688 2.556
summary (lm5)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -41.62 -22.73 -3.88 10.88 105.48
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -20.804 17.221 -1.208 0.234280
## daily.ph.range -3.688 3.239 -1.139 0.261816
## salinity 2.556 0.703 3.636 0.000799 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.15 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2619, Adjusted R-squared: 0.2241
## F-statistic: 6.92 on 2 and 39 DF, p-value: 0.00268
anova (lm5)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 679 679.0 0.6177 0.4366425
## salinity 1 14533 14533.0 13.2214 0.0007989 ***
## Residuals 39 42869 1099.2
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on density of small thalli: daily median ph
lm6 <- lm(no.small.fuc.q ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## -274.633 31.976 2.527
summary (lm6)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -40.495 -23.717 -7.765 11.459 101.857
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -274.6333 311.9059 -0.881 0.383982
## daily.med.ph 31.9756 39.2661 0.814 0.420400
## salinity 2.5270 0.7078 3.570 0.000965 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.42 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2501, Adjusted R-squared: 0.2117
## F-statistic: 6.504 on 2 and 39 DF, p-value: 0.00365
anova (lm6)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 291 291.1 0.2607 0.6125424
## salinity 1 14236 14236.4 12.7480 0.0009653 ***
## Residuals 39 43553 1116.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 7
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## -17.9249 -0.3602 2.3933
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.431 -25.043 -7.569 12.120 104.758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -17.9249 19.9066 -0.900 0.37341
## min.daily.ph.lt7 -0.3602 1.1042 -0.326 0.74603
## salinity 2.3933 0.7559 3.166 0.00299 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.65 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2394, Adjusted R-squared: 0.2004
## F-statistic: 6.139 on 2 and 39 DF, p-value: 0.004808
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 2552 2551.9 2.253 0.141407
## salinity 1 11356 11355.6 10.026 0.002994 **
## Residuals 39 44174 1132.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily minimun ph less than 8
lm7 <- lm(no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## -21.63396 0.02606 2.47772
summary (lm7)
##
## Call:
## lm(formula = no.small.fuc.q ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -38.627 -24.759 -6.982 11.226 105.359
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -21.63396 18.70568 -1.157 0.25449
## min.daily.ph.lt8 0.02606 0.28599 0.091 0.92786
## salinity 2.47772 0.71106 3.485 0.00123 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.7 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2375, Adjusted R-squared: 0.1984
## F-statistic: 6.075 on 2 and 39 DF, p-value: 0.00505
anova (lm7)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 9 9.2 0.0081 0.928714
## salinity 1 13787 13787.2 12.1419 0.001234 **
## Residuals 39 44285 1135.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on density of small thalli: number of days with a daily maximum ph less than 7
lm10 <- lm(no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## -17.9249 -0.3602 2.3933
summary (lm10)
##
## Call:
## lm(formula = no.small.fuc.q ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -39.431 -25.043 -7.569 12.120 104.758
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -17.9249 19.9066 -0.900 0.37341
## max.daily.ph.lt7 -0.3602 1.1042 -0.326 0.74603
## salinity 2.3933 0.7559 3.166 0.00299 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.65 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2394, Adjusted R-squared: 0.2004
## F-statistic: 6.139 on 2 and 39 DF, p-value: 0.004808
anova (lm10)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 2552 2551.9 2.253 0.141407
## salinity 1 11356 11355.6 10.026 0.002994 **
## Residuals 39 44174 1132.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on density of small thalli: number of days with a daily ph range greater than 0.5
lm13 <- lm(no.small.fuc.q ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## -32.0043 0.9839 2.7283
summary (lm13)
##
## Call:
## lm(formula = no.small.fuc.q ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.198 -22.623 -9.266 14.220 94.110
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -32.0043 19.8146 -1.615 0.114333
## daily.ph.range.gt0.5 0.9839 0.8777 1.121 0.269188
## salinity 2.7283 0.7348 3.713 0.000639 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 33.17 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2612, Adjusted R-squared: 0.2233
## F-statistic: 6.893 on 2 and 39 DF, p-value: 0.002732
anova (lm13)
## Analysis of Variance Table
##
## Response: no.small.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 0 0.1 0.0001 0.9927205
## salinity 1 15169 15169.3 13.7865 0.0006391 ***
## Residuals 39 42912 1100.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q2. Effects of salinity and pH on reproductive effort#### Data I have for reproductive effort: covcl.repro (cover class of reproductive tissue), dw.repro (dry weight of reproductive tissue), apices.repro (number of reproductive apices), perc.ra (percent of apices that are reproductive), avg.oog (average number of oogonia) and perc.rdw (percent of dry weight that is reproductive tissue)
Data for salinity: salinity (median salinity), daily.min.sal (daily minimun salinity), daily.max.sal (daily maximum salinity), daily.sal.range (daily salinity range), daily.med.sal (daily median salinity), min.daily.sal.lt5/10/15 (number of days with a minimun daily dalinity less than 5, 10, and 15), max.daily.sal.lt5/10/15 (number of days with a maximum daily salinity less than 5, 10, and 15) and daily.sal.range.gt5/10 (number of days with a daily salinity range greater than 5 and 10)
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5) ####Q2.1 Effects of salinity and pH on cover class of reproductive tissue#### Different salinity terms first
Effect of pH and salinity on cover class of reproductive tissue
lm1 <- lm(covcl.repro ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 0.44840 0.42877 0.35997 -0.06006
summary (lm1)
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.54010 -0.83958 0.05536 0.65234 2.23601
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.44840 37.51407 0.012 0.991
## salinity 0.42877 1.66433 0.258 0.798
## ph 0.35997 4.74161 0.076 0.940
## salinity:ph -0.06006 0.21049 -0.285 0.777
##
## Residual standard error: 0.9804 on 41 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1199, Adjusted R-squared: 0.05548
## F-statistic: 1.861 on 3 and 41 DF, p-value: 0.1512
anova (lm1)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 4.610 4.6104 4.7964 0.03426 *
## ph 1 0.679 0.6793 0.7067 0.40543
## salinity:ph 1 0.078 0.0782 0.0814 0.77684
## Residuals 41 39.410 0.9612
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on cover class of reproductive tissue, interaction term removed
lm2 <- lm(covcl.repro ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 10.83897 -0.04605 -0.95358
summary (lm2)
##
## Call:
## lm(formula = covcl.repro ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.56619 -0.84130 0.05279 0.65350 2.22484
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.83897 8.90187 1.218 0.2302
## salinity -0.04605 0.02030 -2.268 0.0285 *
## ph -0.95358 1.12188 -0.850 0.4002
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9696 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1181, Adjusted R-squared: 0.07614
## F-statistic: 2.813 on 2 and 42 DF, p-value: 0.07136
anova (lm2)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 4.610 4.6104 4.9037 0.03228 *
## ph 1 0.679 0.6793 0.7225 0.40015
## Residuals 42 39.488 0.9402
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on cover class of reproductive tissue: daily minimum salinity
lm3 <- lm(covcl.repro ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = covcl.repro ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 9.33908 -0.04359 -0.78329
summary (lm3)
##
## Call:
## lm(formula = covcl.repro ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.55591 -0.83056 0.03966 0.66872 2.25303
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.33908 9.21917 1.013 0.317
## daily.min.sal -0.04359 0.01972 -2.211 0.033 *
## ph -0.78329 1.16350 -0.673 0.505
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9885 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1164, Adjusted R-squared: 0.07109
## F-statistic: 2.569 on 2 and 39 DF, p-value: 0.08952
anova (lm3)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 4.577 4.5772 4.6848 0.03661 *
## ph 1 0.443 0.4428 0.4532 0.50478
## Residuals 39 38.105 0.9770
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on cover class of reproductive tissue: daily maximum salinity
lm4 <- lm(covcl.repro ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = covcl.repro ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 10.39601 -0.04172 -0.89094
summary (lm4)
##
## Call:
## lm(formula = covcl.repro ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.51685 -0.98552 -0.07688 0.84078 2.44276
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.39601 9.83251 1.057 0.297
## daily.max.sal -0.04172 0.03053 -1.366 0.180
## ph -0.89094 1.22313 -0.728 0.471
##
## Residual standard error: 1.024 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05112, Adjusted R-squared: 0.002458
## F-statistic: 1.051 on 2 and 39 DF, p-value: 0.3594
anova (lm4)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 1.648 1.64780 1.5705 0.2176
## ph 1 0.557 0.55671 0.5306 0.4707
## Residuals 39 40.920 1.04924
plot (lm4)
Effect and salinity and pH on cover class of reproductive tissue: daily salinity range
lm5 <- lm(covcl.repro ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 4.41864 0.07129 -0.32778
summary (lm5)
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.44900 -0.90916 0.07011 0.66383 2.53884
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.41864 9.22764 0.479 0.6347
## daily.sal.range 0.07129 0.03262 2.186 0.0349 *
## ph -0.32778 1.16718 -0.281 0.7803
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9897 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1142, Adjusted R-squared: 0.06877
## F-statistic: 2.514 on 2 and 39 DF, p-value: 0.094
anova (lm5)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 4.847 4.8473 4.9487 0.03197 *
## ph 1 0.077 0.0772 0.0789 0.78033
## Residuals 39 38.200 0.9795
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on cover class of reproductive tissue: daily median salinity
lm6 <- lm(covcl.repro ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = covcl.repro ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 10.1100 -0.0423 -0.8726
summary (lm6)
##
## Call:
## lm(formula = covcl.repro ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.57480 -0.89233 -0.00094 0.69612 2.24551
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.11004 9.39655 1.076 0.2886
## daily.med.sal -0.04230 0.02133 -1.983 0.0544 .
## ph -0.87259 1.18188 -0.738 0.4647
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9994 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09677, Adjusted R-squared: 0.05046
## F-statistic: 2.089 on 2 and 39 DF, p-value: 0.1374
anova (lm6)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 3.629 3.6290 3.6335 0.06402 .
## ph 1 0.544 0.5444 0.5451 0.46475
## Residuals 39 38.952 0.9988
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily minimun salinity less than 5
lm7 <- lm(covcl.repro ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 2.14378 -0.01937 0.03803
summary (lm7)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.42864 -0.72749 0.07821 0.57764 2.58277
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.14378 9.85009 0.218 0.829
## min.daily.sal.lt5 -0.01937 0.01194 -1.623 0.112
## ph 0.03803 1.25475 0.030 0.976
##
## Residual standard error: 0.9966 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.06848, Adjusted R-squared: 0.02412
## F-statistic: 1.544 on 2 and 42 DF, p-value: 0.2254
anova (lm7)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 3.065 3.06550 3.0867 0.08622 .
## ph 1 0.001 0.00091 0.0009 0.97597
## Residuals 42 41.711 0.99313
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily minimun salinity less than 10
lm8 <- lm(covcl.repro ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 7.39001 -0.00259 -0.65016
summary (lm8)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3786 -1.1162 -0.1138 0.7066 2.8761
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.39001 10.49010 0.704 0.485
## min.daily.sal.lt10 -0.00259 0.01290 -0.201 0.842
## ph -0.65016 1.33962 -0.485 0.630
##
## Residual standard error: 1.027 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01103, Adjusted R-squared: -0.03606
## F-statistic: 0.2343 on 2 and 42 DF, p-value: 0.7921
anova (lm8)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 0.246 0.24574 0.2331 0.6318
## ph 1 0.248 0.24836 0.2355 0.6300
## Residuals 42 44.284 1.05437
plot (lm8)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily minimun salinity less than 15
lm9 <- lm(covcl.repro ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 9.597755 0.004594 -0.943574
summary (lm9)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4195 -1.0538 -0.1273 0.7745 2.8176
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.597755 9.902351 0.969 0.338
## min.daily.sal.lt15 0.004594 0.012018 0.382 0.704
## ph -0.943574 1.262584 -0.747 0.459
##
## Residual standard error: 1.026 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01352, Adjusted R-squared: -0.03346
## F-statistic: 0.2877 on 2 and 42 DF, p-value: 0.7514
anova (lm9)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 0.018 0.01787 0.0170 0.8969
## ph 1 0.587 0.58740 0.5585 0.4590
## Residuals 42 44.173 1.05173
plot (lm9)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily maximum salinity less than 5
lm10 <- lm(covcl.repro ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 2.57645 -0.01571 -0.02104
summary (lm10)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.39874 -0.82893 0.03388 0.60410 2.60757
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.57645 10.24593 0.251 0.803
## max.daily.sal.lt5 -0.01571 0.01237 -1.270 0.211
## ph -0.02104 1.30652 -0.016 0.987
##
## Residual standard error: 1.008 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04669, Adjusted R-squared: 0.00129
## F-statistic: 1.028 on 2 and 42 DF, p-value: 0.3664
anova (lm10)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 2.090 2.09025 2.0566 0.1590
## ph 1 0.000 0.00026 0.0003 0.9872
## Residuals 42 42.687 1.01636
plot (lm10)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily maximum salinity less than 10
lm11 <- lm(covcl.repro ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 2.4221975 -0.0162683 -0.0001903
summary (lm11)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.40446 -0.81877 0.03486 0.59556 2.59559
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.4221975 10.2290847 0.237 0.814
## max.daily.sal.lt10 -0.0162683 0.0124313 -1.309 0.198
## ph -0.0001903 1.3045722 0.000 1.000
##
## Residual standard error: 1.007 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04887, Adjusted R-squared: 0.003576
## F-statistic: 1.079 on 2 and 42 DF, p-value: 0.3492
anova (lm11)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 2.188 2.1882 2.1579 0.1493
## ph 1 0.000 0.0000 0.0000 0.9999
## Residuals 42 42.590 1.0140
plot (lm11)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily maximum salinity less than 15
lm12 <- lm(covcl.repro ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 2.76494 -0.01486 -0.04445
summary (lm12)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.40779 -0.86386 0.01127 0.59821 2.69472
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.76494 10.38024 0.266 0.791
## max.daily.sal.lt15 -0.01486 0.01275 -1.166 0.250
## ph -0.04445 1.32486 -0.034 0.973
##
## Residual standard error: 1.011 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.04111, Adjusted R-squared: -0.004553
## F-statistic: 0.9003 on 2 and 42 DF, p-value: 0.4142
anova (lm12)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 1.840 1.83960 1.7995 0.1870
## ph 1 0.001 0.00115 0.0011 0.9734
## Residuals 42 42.937 1.02231
plot (lm12)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily salinity range greater than 10
lm13 <- lm(covcl.repro ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 5.987381 -0.007387 -0.464675
summary (lm13)
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.36482 -1.04312 -0.05575 0.66306 2.81128
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.987381 10.191191 0.588 0.560
## daily.sal.range.gt10 -0.007387 0.012907 -0.572 0.570
## ph -0.464675 1.300051 -0.357 0.723
##
## Residual standard error: 1.023 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01775, Adjusted R-squared: -0.02903
## F-statistic: 0.3794 on 2 and 42 DF, p-value: 0.6866
anova (lm13)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 0.661 0.66083 0.6310 0.4314
## ph 1 0.134 0.13379 0.1278 0.7226
## Residuals 42 43.983 1.04722
plot (lm13)
Effect of salinity and pH on cover class of reproductive tissue: number of days with a daily salinity range greater than 5
lm14 <- lm(covcl.repro ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 7.736780 -0.004199 -0.689381
summary (lm14)
##
## Call:
## lm(formula = covcl.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.36920 -1.10416 -0.09996 0.67216 2.89584
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.736780 9.498784 0.815 0.420
## daily.sal.range.gt5 -0.004199 0.011783 -0.356 0.723
## ph -0.689381 1.208386 -0.570 0.571
##
## Residual standard error: 1.026 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.01307, Adjusted R-squared: -0.03393
## F-statistic: 0.2781 on 2 and 42 DF, p-value: 0.7586
anova (lm14)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 0.243 0.24275 0.2307 0.6335
## ph 1 0.342 0.34246 0.3255 0.5714
## Residuals 42 44.193 1.05220
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on cover class of reproductive tissue: daily minimum ph
lm3 <- lm(covcl.repro ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = covcl.repro ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 4.18295 -0.11496 -0.04498
summary (lm3)
##
## Call:
## lm(formula = covcl.repro ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.41212 -0.92758 0.03605 0.70758 2.28876
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.18295 10.64235 0.393 0.6963
## daily.min.ph -0.11496 1.36026 -0.085 0.9330
## salinity -0.04498 0.02049 -2.196 0.0337 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9779 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1031, Adjusted R-squared: 0.06041
## F-statistic: 2.414 on 2 and 42 DF, p-value: 0.1017
anova (lm3)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 0.008 0.0077 0.0081 0.9289
## salinity 1 4.610 4.6095 4.8206 0.0337 *
## Residuals 42 40.161 0.9562
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on cover class of reproductive tissue: daily maximum ph
lm4 <- lm(covcl.repro ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = covcl.repro ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 10.94438 -0.94964 -0.04734
summary (lm4)
##
## Call:
## lm(formula = covcl.repro ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.58096 -0.84162 0.02225 0.72491 2.19505
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 10.94438 6.10897 1.792 0.0804 .
## daily.max.ph -0.94964 0.75486 -1.258 0.2153
## salinity -0.04734 0.02015 -2.350 0.0236 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.96 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1355, Adjusted R-squared: 0.09437
## F-statistic: 3.293 on 2 and 42 DF, p-value: 0.04696
anova (lm4)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 0.981 0.9811 1.0645 0.30810
## salinity 1 5.088 5.0879 5.5205 0.02357 *
## Residuals 42 38.709 0.9216
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on cover class of reproductive tissue: daily ph range
lm5 <- lm(covcl.repro ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 3.28083 0.05096 -0.04586
summary (lm5)
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.36586 -0.91996 0.06476 0.68493 2.32533
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.28083 0.50364 6.514 7.23e-08 ***
## daily.ph.range 0.05096 0.09506 0.536 0.5947
## salinity -0.04586 0.02044 -2.243 0.0302 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9746 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1091, Adjusted R-squared: 0.06663
## F-statistic: 2.571 on 2 and 42 DF, p-value: 0.08848
anova (lm5)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 0.103 0.1026 0.108 0.7440
## salinity 1 4.781 4.7807 5.033 0.0302 *
## Residuals 42 39.894 0.9499
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect salinity and pH on cover class of reproductive tissue: daily median ph
lm6 <- lm(covcl.repro ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = covcl.repro ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 9.63859 -0.80213 -0.04571
summary (lm6)
##
## Call:
## lm(formula = covcl.repro ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.53881 -0.85267 0.04676 0.68040 2.21041
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.63859 8.71860 1.106 0.2752
## daily.med.ph -0.80213 1.09879 -0.730 0.4694
## salinity -0.04571 0.02033 -2.249 0.0298 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9718 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1142, Adjusted R-squared: 0.07202
## F-statistic: 2.707 on 2 and 42 DF, p-value: 0.07835
anova (lm6)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 0.339 0.3390 0.3590 0.55230
## salinity 1 4.775 4.7747 5.0558 0.02985 *
## Residuals 42 39.664 0.9444
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily minimun ph less than 7
lm7 <- lm(covcl.repro ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 3.11143 0.02015 -0.04007
summary (lm7)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.32217 -0.91782 -0.01232 0.70541 2.41136
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.11143 0.57233 5.436 2.56e-06 ***
## min.daily.ph.lt7 0.02015 0.03181 0.634 0.5298
## salinity -0.04007 0.02168 -1.848 0.0716 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9733 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1115, Adjusted R-squared: 0.06914
## F-statistic: 2.634 on 2 and 42 DF, p-value: 0.08361
anova (lm7)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 1.754 1.7542 1.8517 0.1808
## salinity 1 3.236 3.2365 3.4165 0.0716 .
## Residuals 42 39.787 0.9473
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily minimun ph less than 8
lm7 <- lm(covcl.repro ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 3.42009 -0.00576 -0.04498
summary (lm7)
##
## Call:
## lm(formula = covcl.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.27655 -0.84816 0.06527 0.76202 2.37377
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.42009 0.53699 6.369 1.17e-07 ***
## min.daily.ph.lt8 -0.00576 0.00807 -0.714 0.4793
## salinity -0.04498 0.02030 -2.216 0.0322 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9721 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1137, Adjusted R-squared: 0.07151
## F-statistic: 2.694 on 2 and 42 DF, p-value: 0.07926
anova (lm7)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 0.453 0.4527 0.4791 0.49263
## salinity 1 4.639 4.6391 4.9096 0.03218 *
## Residuals 42 39.686 0.9449
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily maximum ph less than 7
lm10 <- lm(covcl.repro ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = covcl.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 3.11143 0.02015 -0.04007
summary (lm10)
##
## Call:
## lm(formula = covcl.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.32217 -0.91782 -0.01232 0.70541 2.41136
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.11143 0.57233 5.436 2.56e-06 ***
## max.daily.ph.lt7 0.02015 0.03181 0.634 0.5298
## salinity -0.04007 0.02168 -1.848 0.0716 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9733 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1115, Adjusted R-squared: 0.06914
## F-statistic: 2.634 on 2 and 42 DF, p-value: 0.08361
anova (lm10)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 1.754 1.7542 1.8517 0.1808
## salinity 1 3.236 3.2365 3.4165 0.0716 .
## Residuals 42 39.787 0.9473
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect salinity and pH on cover class of reproductive tissue: number of days with a daily ph range greater than 0.5
lm13 <- lm(covcl.repro ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 3.387132 -0.009277 -0.047095
summary (lm13)
##
## Call:
## lm(formula = covcl.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4265 -0.9674 0.0300 0.7377 2.2696
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.387132 0.575693 5.884 5.84e-07 ***
## daily.ph.range.gt0.5 -0.009277 0.025071 -0.370 0.7132
## salinity -0.047095 0.021280 -2.213 0.0324 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9763 on 42 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.1059, Adjusted R-squared: 0.0633
## F-statistic: 2.487 on 2 and 42 DF, p-value: 0.09536
anova (lm13)
## Analysis of Variance Table
##
## Response: covcl.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 0.072 0.0718 0.0753 0.78511
## salinity 1 4.669 4.6691 4.8980 0.03237 *
## Residuals 42 40.037 0.9533
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
####Q2.2 Effects of salinity and pH on dry weight of reproductive tissue#### Different salinity terms first
Effect of pH and salinity on dry weight of reproductive tissue
lm1 <- lm(dw.repro ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = dw.repro ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 29.13342 -0.23620 -3.58860 0.03165
summary (lm1)
##
## Call:
## lm(formula = dw.repro ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4361 -0.7506 -0.3286 0.6013 3.0755
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 29.13342 43.00357 0.677 0.502
## salinity -0.23620 1.92164 -0.123 0.903
## ph -3.58860 5.43627 -0.660 0.513
## salinity:ph 0.03165 0.24310 0.130 0.897
##
## Residual standard error: 1.11 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1289, Adjusted R-squared: 0.06009
## F-statistic: 1.874 on 3 and 38 DF, p-value: 0.1505
anova (lm1)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 0.751 0.7507 0.6093 0.43989
## ph 1 6.154 6.1541 4.9951 0.03138 *
## salinity:ph 1 0.021 0.0209 0.0169 0.89711
## Residuals 38 46.817 1.2320
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on dry weight of reproductive tissue, interaction term removed
lm2 <- lm(dw.repro ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = dw.repro ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 23.69833 0.01394 -2.90138
summary (lm2)
##
## Call:
## lm(formula = dw.repro ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3749 -0.7483 -0.3525 0.5908 3.1315
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.69833 10.17504 2.329 0.0251 *
## salinity 0.01394 0.02326 0.599 0.5525
## ph -2.90138 1.28171 -2.264 0.0292 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.096 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1285, Adjusted R-squared: 0.08378
## F-statistic: 2.875 on 2 and 39 DF, p-value: 0.06846
anova (lm2)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 0.751 0.7507 0.6251 0.43396
## ph 1 6.154 6.1541 5.1242 0.02923 *
## Residuals 39 46.838 1.2010
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on dry weight of reproductive tissue: daily minimum salinity
lm3 <- lm(dw.repro ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = dw.repro ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 23.508316 0.008994 -2.860912
summary (lm3)
##
## Call:
## lm(formula = dw.repro ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4088 -0.7541 -0.4795 0.6086 3.0980
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.508316 10.671121 2.203 0.0341 *
## daily.min.sal 0.008994 0.022979 0.391 0.6978
## ph -2.860912 1.345801 -2.126 0.0404 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.129 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1196, Adjusted R-squared: 0.07068
## F-statistic: 2.445 on 2 and 36 DF, p-value: 0.101
anova (lm3)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 0.473 0.4728 0.3710 0.54629
## ph 1 5.759 5.7591 4.5191 0.04045 *
## Residuals 36 45.878 1.2744
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on dry weight of reproductive tissue: daily maximum salinity
lm4 <- lm(dw.repro ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = dw.repro ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 21.61833 0.02819 -2.69295
summary (lm4)
##
## Call:
## lm(formula = dw.repro ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2803 -0.7569 -0.3105 0.4818 3.2274
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 21.61833 10.90360 1.983 0.0551 .
## daily.max.sal 0.02819 0.03396 0.830 0.4119
## ph -2.69295 1.35554 -1.987 0.0546 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.121 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1325, Adjusted R-squared: 0.08425
## F-statistic: 2.748 on 2 and 36 DF, p-value: 0.0775
anova (lm4)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 1.946 1.9459 1.5495 0.22125
## ph 1 4.956 4.9562 3.9467 0.05462 .
## Residuals 36 45.208 1.2558
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on dry weight of reproductive tissue: daily salinity range
lm5 <- lm(dw.repro ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 23.71741 0.01421 -2.87473
summary (lm5)
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5687 -0.6877 -0.4659 0.4886 2.9610
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.71741 10.61231 2.235 0.0317 *
## daily.sal.range 0.01421 0.03769 0.377 0.7083
## ph -2.87473 1.34319 -2.140 0.0392 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.129 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1193, Adjusted R-squared: 0.0704
## F-statistic: 2.439 on 2 and 36 DF, p-value: 0.1016
anova (lm5)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 0.379 0.3787 0.2971 0.58909
## ph 1 5.839 5.8393 4.5806 0.03918 *
## Residuals 36 45.892 1.2748
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on dry weight of reproductive tissue: daily median salinity
lm6 <- lm(dw.repro ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = dw.repro ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 22.73780 0.01629 -2.78686
summary (lm6)
##
## Call:
## lm(formula = dw.repro ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3156 -0.7908 -0.3855 0.5797 3.1840
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.73780 10.71738 2.122 0.0408 *
## daily.med.sal 0.01629 0.02446 0.666 0.5097
## ph -2.78686 1.34720 -2.069 0.0458 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.124 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1266, Adjusted R-squared: 0.07808
## F-statistic: 2.609 on 2 and 36 DF, p-value: 0.08746
anova (lm6)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 1.187 1.1873 0.9391 0.33896
## ph 1 5.410 5.4101 4.2793 0.04582 *
## Residuals 36 45.513 1.2642
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun salinity less than 5
lm7 <- lm(dw.repro ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 23.144569 -0.004583 -2.783073
summary (lm7)
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5453 -0.7510 -0.5139 0.5368 2.9677
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.144569 10.903640 2.123 0.0402 *
## min.daily.sal.lt5 -0.004583 0.013496 -0.340 0.7360
## ph -2.783073 1.389178 -2.003 0.0521 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.099 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.123, Adjusted R-squared: 0.07808
## F-statistic: 2.736 on 2 and 39 DF, p-value: 0.07727
anova (lm7)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 1.763 1.7627 1.4586 0.23442
## ph 1 4.850 4.8503 4.0136 0.05212 .
## Residuals 39 47.130 1.2085
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun salinity less than 10
lm8 <- lm(dw.repro ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 22.828587 -0.004819 -2.740937
summary (lm8)
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5099 -0.7636 -0.4957 0.5613 3.0076
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.828587 11.292281 2.022 0.0501 .
## min.daily.sal.lt10 -0.004819 0.014238 -0.338 0.7368
## ph -2.740937 1.442685 -1.900 0.0649 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.099 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.123, Adjusted R-squared: 0.07806
## F-statistic: 2.736 on 2 and 39 DF, p-value: 0.0773
anova (lm8)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 2.250 2.2500 1.8618 0.18024
## ph 1 4.362 4.3621 3.6096 0.06486 .
## Residuals 39 47.131 1.2085
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun salinity less than 15
lm9 <- lm(dw.repro ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 24.3257362 -0.0007953 -2.9378646
summary (lm9)
##
## Call:
## lm(formula = dw.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5270 -0.7207 -0.5054 0.6026 2.9993
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.3257362 10.6905055 2.275 0.0285 *
## min.daily.sal.lt15 -0.0007953 0.0133317 -0.060 0.9527
## ph -2.9378646 1.3635212 -2.155 0.0374 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.101 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1205, Adjusted R-squared: 0.07543
## F-statistic: 2.673 on 2 and 39 DF, p-value: 0.08171
anova (lm9)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 0.852 0.8517 0.7028 0.40696
## ph 1 5.626 5.6262 4.6424 0.03743 *
## Residuals 39 47.265 1.2119
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum salinity less than 5
lm10 <- lm(dw.repro ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 23.73076 -0.00228 -2.86057
summary (lm10)
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5417 -0.7292 -0.4983 0.5745 2.9759
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.73076 11.22706 2.114 0.0410 *
## max.daily.sal.lt5 -0.00228 0.01385 -0.165 0.8701
## ph -2.86057 1.43198 -1.998 0.0528 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.101 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1211, Adjusted R-squared: 0.07599
## F-statistic: 2.686 on 2 and 39 DF, p-value: 0.08075
anova (lm10)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 1.673 1.6732 1.3814 0.24698
## ph 1 4.833 4.8333 3.9905 0.05277 .
## Residuals 39 47.237 1.2112
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum salinity less than 10
lm11 <- lm(dw.repro ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 23.118459 -0.004061 -2.780111
summary (lm11)
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5471 -0.7488 -0.4920 0.5488 2.9705
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.118459 11.214668 2.061 0.0460 *
## max.daily.sal.lt10 -0.004061 0.013929 -0.292 0.7722
## ph -2.780111 1.430642 -1.943 0.0592 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.1 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1224, Adjusted R-squared: 0.07736
## F-statistic: 2.719 on 2 and 39 DF, p-value: 0.07845
anova (lm11)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 2.009 2.0094 1.6615 0.20500
## ph 1 4.567 4.5670 3.7763 0.05923 .
## Residuals 39 47.167 1.2094
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum salinity less than 15
lm12 <- lm(dw.repro ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 21.799386 -0.007591 -2.606681
summary (lm12)
##
## Call:
## lm(formula = dw.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5371 -0.7683 -0.4690 0.5256 2.9577
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 21.799386 11.312447 1.927 0.0613 .
## max.daily.sal.lt15 -0.007591 0.014222 -0.534 0.5965
## ph -2.606681 1.444329 -1.805 0.0788 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.097 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1268, Adjusted R-squared: 0.08206
## F-statistic: 2.833 on 2 and 39 DF, p-value: 0.07102
anova (lm12)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 2.897 2.8972 2.4078 0.12881
## ph 1 3.919 3.9192 3.2572 0.07884 .
## Residuals 39 46.927 1.2032
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily salinity range greater than 10
lm13 <- lm(dw.repro ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 24.077915 -0.001496 -2.905509
summary (lm13)
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5256 -0.7225 -0.5028 0.5957 2.9920
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.077915 11.011173 2.187 0.0348 *
## daily.sal.range.gt10 -0.001496 0.014311 -0.105 0.9173
## ph -2.905509 1.405082 -2.068 0.0453 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.101 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1207, Adjusted R-squared: 0.07561
## F-statistic: 2.677 on 2 and 39 DF, p-value: 0.08141
anova (lm13)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 1.306 1.3056 1.0775 0.30565
## ph 1 5.181 5.1813 4.2760 0.04533 *
## Residuals 39 47.256 1.2117
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on dry weight of reproductive tissue: number of days with a daily salinity range greater than 5
lm14 <- lm(dw.repro ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 24.4145764 -0.0009184 -2.9486754
summary (lm14)
##
## Call:
## lm(formula = dw.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5310 -0.7171 -0.5069 0.5994 2.9976
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.4145764 10.2555724 2.381 0.0223 *
## daily.sal.range.gt5 -0.0009184 0.0129238 -0.071 0.9437
## ph -2.9486754 1.3044237 -2.261 0.0294 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.101 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1206, Adjusted R-squared: 0.07547
## F-statistic: 2.673 on 2 and 39 DF, p-value: 0.08165
anova (lm14)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 0.287 0.2871 0.2369 0.62917
## ph 1 6.193 6.1926 5.1099 0.02945 *
## Residuals 39 47.263 1.2119
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on dry weight of reproductive tissue: daily minimum ph
lm3 <- lm(dw.repro ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = dw.repro ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 23.15752 -2.87063 0.01381
summary (lm3)
##
## Call:
## lm(formula = dw.repro ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3611 -0.7251 -0.3861 0.5389 2.8630
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.15752 12.47810 1.856 0.0710 .
## daily.min.ph -2.87063 1.59338 -1.802 0.0793 .
## salinity 0.01381 0.02382 0.580 0.5653
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08973, Adjusted R-squared: 0.04304
## F-statistic: 1.922 on 2 and 39 DF, p-value: 0.1599
anova (lm3)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 4.400 4.4003 3.5079 0.06859 .
## salinity 1 0.422 0.4218 0.3363 0.56532
## Residuals 39 48.921 1.2544
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on dry weight of reproductive tissue: daily maximum ph
lm4 <- lm(dw.repro ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = dw.repro ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 9.97998 -1.15051 0.01536
summary (lm4)
##
## Call:
## lm(formula = dw.repro ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2149 -0.7934 -0.3205 0.4762 3.4639
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.97998 7.41154 1.347 0.186
## daily.max.ph -1.15051 0.91606 -1.256 0.217
## salinity 0.01536 0.02429 0.632 0.531
##
## Residual standard error: 1.143 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0523, Adjusted R-squared: 0.003698
## F-statistic: 1.076 on 2 and 39 DF, p-value: 0.3508
anova (lm4)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 2.288 2.28837 1.7523 0.1933
## salinity 1 0.522 0.52231 0.3999 0.5308
## Residuals 39 50.932 1.30596
plot (lm4)
Effect of salinity and pH on dry weight of reproductive tissue: daily ph range
lm5 <- lm(dw.repro ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 0.68748 0.06779 0.01780
summary (lm5)
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.1090 -0.7310 -0.4039 0.3565 3.7290
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.68748 0.60509 1.136 0.263
## daily.ph.range 0.06779 0.16106 0.421 0.676
## salinity 0.01780 0.02463 0.723 0.474
##
## Residual standard error: 1.163 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01843, Adjusted R-squared: -0.03191
## F-statistic: 0.3661 on 2 and 39 DF, p-value: 0.6958
anova (lm5)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 0.284 0.28374 0.2098 0.6495
## salinity 1 0.707 0.70658 0.5224 0.4741
## Residuals 39 52.753 1.35263
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on dry weight of reproductive tissue: daily median ph
lm6 <- lm(dw.repro ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = dw.repro ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 18.40177 -2.23365 0.01559
summary (lm6)
##
## Call:
## lm(formula = dw.repro ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2410 -0.7763 -0.3866 0.5749 3.2641
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.40177 10.22272 1.800 0.0796 .
## daily.med.ph -2.23365 1.28793 -1.734 0.0908 .
## salinity 0.01559 0.02381 0.655 0.5165
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.123 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08457, Adjusted R-squared: 0.03762
## F-statistic: 1.801 on 2 and 39 DF, p-value: 0.1785
anova (lm6)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 4.004 4.0043 3.1742 0.0826 .
## salinity 1 0.541 0.5407 0.4286 0.5165
## Residuals 39 49.198 1.2615
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun ph less than 7
lm7 <- lm(dw.repro ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 0.98621 -0.03313 0.01059
summary (lm7)
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.1520 -0.8259 -0.3991 0.3997 3.5814
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.98621 0.68223 1.446 0.156
## min.daily.ph.lt7 -0.03313 0.03784 -0.875 0.387
## salinity 0.01059 0.02597 0.408 0.686
##
## Residual standard error: 1.154 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03297, Adjusted R-squared: -0.01662
## F-statistic: 0.6649 on 2 and 39 DF, p-value: 0.5201
anova (lm7)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 1.550 1.55038 1.1634 0.2874
## salinity 1 0.222 0.22161 0.1663 0.6856
## Residuals 39 51.971 1.33259
plot (lm7)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily minimun ph less than 8
lm7 <- lm(dw.repro ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 0.829083 -0.005451 0.018162
summary (lm7)
##
## Call:
## lm(formula = dw.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0741 -0.7589 -0.4176 0.4424 3.7772
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.829083 0.647042 1.281 0.208
## min.daily.ph.lt8 -0.005451 0.009990 -0.546 0.588
## salinity 0.018162 0.024564 0.739 0.464
##
## Residual standard error: 1.161 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.02144, Adjusted R-squared: -0.02875
## F-statistic: 0.4272 on 2 and 39 DF, p-value: 0.6554
anova (lm7)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 0.415 0.41485 0.3076 0.5823
## salinity 1 0.737 0.73720 0.5467 0.4641
## Residuals 39 52.591 1.34849
plot (lm7)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily maximum ph less than 7
lm10 <- lm(dw.repro ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = dw.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 0.98621 -0.03313 0.01059
summary (lm10)
##
## Call:
## lm(formula = dw.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.1520 -0.8259 -0.3991 0.3997 3.5814
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.98621 0.68223 1.446 0.156
## max.daily.ph.lt7 -0.03313 0.03784 -0.875 0.387
## salinity 0.01059 0.02597 0.408 0.686
##
## Residual standard error: 1.154 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03297, Adjusted R-squared: -0.01662
## F-statistic: 0.6649 on 2 and 39 DF, p-value: 0.5201
anova (lm10)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 1.550 1.55038 1.1634 0.2874
## salinity 1 0.222 0.22161 0.1663 0.6856
## Residuals 39 51.971 1.33259
plot (lm10)
Effect salinity and pH on dry weight of reproductive tissue: number of days with a daily ph range greater than 0.5
lm13 <- lm(dw.repro ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 1.08171 -0.03480 0.01038
summary (lm13)
##
## Call:
## lm(formula = dw.repro ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.1560 -0.8290 -0.3845 0.4002 3.5253
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.08171 0.67781 1.596 0.119
## daily.ph.range.gt0.5 -0.03480 0.02968 -1.172 0.248
## salinity 0.01038 0.02516 0.412 0.682
##
## Residual standard error: 1.146 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04754, Adjusted R-squared: -0.001308
## F-statistic: 0.9732 on 2 and 39 DF, p-value: 0.3868
anova (lm13)
## Analysis of Variance Table
##
## Response: dw.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 2.331 2.33150 1.7764 0.1903
## salinity 1 0.223 0.22327 0.1701 0.6823
## Residuals 39 51.188 1.31252
plot (lm13)
####Q2.3 Effects of salinity and pH on number of reproductive apices#### Different salinity terms first
Effect of pH and salinity on number of reproductive apices
lm1 <- lm(apices.repro ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = apices.repro ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## 598.588 -13.460 -72.716 1.723
summary (lm1)
##
## Call:
## lm(formula = apices.repro ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -28.018 -19.911 -7.709 13.912 63.213
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 598.588 985.195 0.608 0.547
## salinity -13.460 44.024 -0.306 0.761
## ph -72.716 124.543 -0.584 0.563
## salinity:ph 1.723 5.569 0.309 0.759
##
## Residual standard error: 25.43 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04191, Adjusted R-squared: -0.03372
## F-statistic: 0.5541 on 3 and 38 DF, p-value: 0.6485
anova (lm1)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 102.4 102.41 0.1584 0.6929
## ph 1 910.7 910.67 1.4083 0.2427
## salinity:ph 1 61.9 61.91 0.0957 0.7587
## Residuals 38 24572.1 646.63
plot (lm1)
Effect of pH and salinity on number of reproductive apices, interaction term removed
lm2 <- lm(apices.repro ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = apices.repro ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 302.6265 0.1607 -35.2942
summary (lm2)
##
## Call:
## lm(formula = apices.repro ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.907 -19.912 -8.809 13.195 66.262
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 302.6265 233.3476 1.297 0.202
## salinity 0.1607 0.5334 0.301 0.765
## ph -35.2942 29.3939 -1.201 0.237
##
## Residual standard error: 25.13 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0395, Adjusted R-squared: -0.009755
## F-statistic: 0.8019 on 2 and 39 DF, p-value: 0.4557
anova (lm2)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 102.4 102.41 0.1621 0.6894
## ph 1 910.7 910.67 1.4418 0.2371
## Residuals 39 24634.0 631.64
plot (lm2)
Effect and salinity and pH on number of reproductive apices: daily minimum salinity
lm3 <- lm(apices.repro ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = apices.repro ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 304.88087 0.08016 -35.41148
summary (lm3)
##
## Call:
## lm(formula = apices.repro ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.395 -19.858 -9.175 12.684 66.190
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 304.88087 238.97854 1.276 0.210
## daily.min.sal 0.08016 0.51462 0.156 0.877
## ph -35.41148 30.13906 -1.175 0.248
##
## Residual standard error: 25.28 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.03889, Adjusted R-squared: -0.01451
## F-statistic: 0.7283 on 2 and 36 DF, p-value: 0.4897
anova (lm3)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 48.6 48.61 0.0761 0.7843
## ph 1 882.3 882.33 1.3805 0.2477
## Residuals 36 23009.5 639.15
plot (lm3)
Effect and salinity and pH on number of reproductive apices: daily maximum salinity
lm4 <- lm(apices.repro ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = apices.repro ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 281.7583 0.3222 -33.3580
summary (lm4)
##
## Call:
## lm(formula = apices.repro ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.572 -19.360 -8.928 11.295 67.906
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 281.7583 245.4662 1.148 0.259
## daily.max.sal 0.3222 0.7645 0.421 0.676
## ph -33.3580 30.5165 -1.093 0.282
##
## Residual standard error: 25.23 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.04296, Adjusted R-squared: -0.01021
## F-statistic: 0.808 on 2 and 36 DF, p-value: 0.4537
anova (lm4)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 268.0 268.00 0.4211 0.5205
## ph 1 760.5 760.48 1.1949 0.2816
## Residuals 36 22911.9 636.44
plot (lm4)
Effect and salinity and pH on number of reproductive apices: daily salinity range
lm5 <- lm(apices.repro ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 302.1795 0.2909 -35.0801
summary (lm5)
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.851 -18.494 -7.041 11.915 64.474
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 302.1795 237.3132 1.273 0.211
## daily.sal.range 0.2909 0.8429 0.345 0.732
## ph -35.0801 30.0365 -1.168 0.251
##
## Residual standard error: 25.25 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.04141, Adjusted R-squared: -0.01185
## F-statistic: 0.7776 on 2 and 36 DF, p-value: 0.4671
anova (lm5)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 121.8 121.81 0.1911 0.6646
## ph 1 869.5 869.53 1.3640 0.2505
## Residuals 36 22949.1 637.47
plot (lm5)
Effect and salinity and pH on number of reproductive apices: daily median salinity
lm6 <- lm(apices.repro ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = apices.repro ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 295.2991 0.1773 -34.5003
summary (lm6)
##
## Call:
## lm(formula = apices.repro ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.869 -19.513 -8.856 12.322 67.313
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 295.2991 240.7094 1.227 0.228
## daily.med.sal 0.1773 0.5493 0.323 0.749
## ph -34.5003 30.2576 -1.140 0.262
##
## Residual standard error: 25.25 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.04101, Adjusted R-squared: -0.01226
## F-statistic: 0.7698 on 2 and 36 DF, p-value: 0.4706
anova (lm6)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 152.8 152.77 0.2396 0.6275
## ph 1 829.1 829.12 1.3001 0.2617
## Residuals 36 22958.5 637.74
plot (lm6)
Effect of salinity and pH on number of reproductive apices: number of days with a daily minimun salinity less than 5
lm7 <- lm(apices.repro ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 292.22152 -0.06613 -33.40128
summary (lm7)
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.766 -19.325 -8.706 13.810 64.334
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 292.22152 249.42459 1.172 0.248
## min.daily.sal.lt5 -0.06613 0.30872 -0.214 0.832
## ph -33.40128 31.77793 -1.051 0.300
##
## Residual standard error: 25.15 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0384, Adjusted R-squared: -0.01091
## F-statistic: 0.7787 on 2 and 39 DF, p-value: 0.466
anova (lm7)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 286.2 286.18 0.4526 0.5051
## ph 1 698.6 698.63 1.1048 0.2997
## Residuals 39 24662.3 632.37
plot (lm7)
Effect of salinity and pH on number of reproductive apices: number of days with a daily minimun salinity less than 10
lm8 <- lm(apices.repro ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 312.573492 0.001009 -36.079126
summary (lm8)
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.566 -19.468 -9.011 14.022 64.525
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 312.573492 258.464271 1.209 0.234
## min.daily.sal.lt10 0.001009 0.325893 0.003 0.998
## ph -36.079126 33.021008 -1.093 0.281
##
## Residual standard error: 25.16 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03727, Adjusted R-squared: -0.0121
## F-statistic: 0.7548 on 2 and 39 DF, p-value: 0.4768
anova (lm8)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 200.0 199.99 0.3159 0.5773
## ph 1 755.8 755.81 1.1938 0.2813
## Residuals 39 24691.3 633.11
plot (lm8)
Effect of salinity and pH on number of reproductive apices: number of days with a daily minimun salinity less than 15
lm9 <- lm(apices.repro ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 337.36793 0.09779 -39.41691
summary (lm9)
##
## Call:
## lm(formula = apices.repro ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.689 -18.258 -9.185 14.916 62.313
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 337.36793 244.02024 1.383 0.175
## min.daily.sal.lt15 0.09779 0.30431 0.321 0.750
## ph -39.41691 31.12358 -1.266 0.213
##
## Residual standard error: 25.13 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03981, Adjusted R-squared: -0.009431
## F-statistic: 0.8085 on 2 and 39 DF, p-value: 0.4529
anova (lm9)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 8.2 8.21 0.0130 0.9098
## ph 1 1012.8 1012.79 1.6039 0.2129
## Residuals 39 24626.1 631.44
plot (lm9)
Effect of salinity and pH on number of reproductive apices: number of days with a daily maximum salinity less than 5
lm10 <- lm(apices.repro ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 302.78982 -0.02688 -34.79610
summary (lm10)
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.63 -19.71 -8.92 13.92 64.47
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 302.78982 256.66031 1.180 0.245
## max.daily.sal.lt5 -0.02688 0.31657 -0.085 0.933
## ph -34.79610 32.73641 -1.063 0.294
##
## Residual standard error: 25.16 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03744, Adjusted R-squared: -0.01192
## F-statistic: 0.7586 on 2 and 39 DF, p-value: 0.4751
anova (lm10)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 245.2 245.20 0.3874 0.5373
## ph 1 715.2 715.15 1.1298 0.2944
## Residuals 39 24686.8 632.99
plot (lm10)
Effect of salinity and pH on number of reproductive apices: number of days with a daily maximum salinity less than 10
lm11 <- lm(apices.repro ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 289.95871 -0.06402 -33.11102
summary (lm11)
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.740 -19.409 -8.808 13.768 64.360
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 289.95871 256.45803 1.131 0.265
## max.daily.sal.lt10 -0.06402 0.31854 -0.201 0.842
## ph -33.11102 32.71606 -1.012 0.318
##
## Residual standard error: 25.15 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03826, Adjusted R-squared: -0.01106
## F-statistic: 0.7758 on 2 and 39 DF, p-value: 0.4673
anova (lm11)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 333.5 333.52 0.5273 0.4721
## ph 1 647.8 647.82 1.0243 0.3177
## Residuals 39 24665.8 632.46
plot (lm11)
Effect of salinity and pH on number of reproductive apices: number of days with a daily maximum salinity less than 15
lm12 <- lm(apices.repro ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 268.2051 -0.1223 -30.2510
summary (lm12)
##
## Call:
## lm(formula = apices.repro ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.950 -18.681 -8.872 13.452 64.150
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 268.2051 259.0208 1.035 0.307
## max.daily.sal.lt15 -0.1223 0.3256 -0.376 0.709
## ph -30.2510 33.0708 -0.915 0.366
##
## Residual standard error: 25.12 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04074, Adjusted R-squared: -0.008454
## F-statistic: 0.8281 on 2 and 39 DF, p-value: 0.4444
anova (lm12)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 517.0 516.99 0.8195 0.3709
## ph 1 527.8 527.84 0.8367 0.3660
## Residuals 39 24602.3 630.83
plot (lm12)
Effect of salinity and pH on number of reproductive apices: number of days with a daily salinity range greater than 10
lm13 <- lm(apices.repro ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 324.63943 0.04107 -37.67656
summary (lm13)
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.842 -19.068 -9.119 14.223 64.236
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 324.63943 251.64516 1.290 0.205
## daily.sal.range.gt10 0.04107 0.32706 0.126 0.901
## ph -37.67656 32.11122 -1.173 0.248
##
## Residual standard error: 25.16 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03766, Adjusted R-squared: -0.01169
## F-statistic: 0.763 on 2 and 39 DF, p-value: 0.4731
anova (lm13)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 94.5 94.54 0.1494 0.7012
## ph 1 871.2 871.23 1.3767 0.2478
## Residuals 39 24681.4 632.86
plot (lm13)
Effect of salinity and pH on number of reproductive apices: number of days with a daily salinity range greater than 5
lm14 <- lm(apices.repro ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 323.07846 0.08621 -37.60134
summary (lm14)
##
## Call:
## lm(formula = apices.repro ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29.055 -18.376 -9.066 14.925 62.993
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 323.07846 234.15060 1.380 0.176
## daily.sal.range.gt5 0.08621 0.29507 0.292 0.772
## ph -37.60134 29.78201 -1.263 0.214
##
## Residual standard error: 25.13 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03937, Adjusted R-squared: -0.009894
## F-statistic: 0.7992 on 2 and 39 DF, p-value: 0.4569
anova (lm14)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 2.7 2.71 0.0043 0.9481
## ph 1 1007.0 1007.00 1.5940 0.2142
## Residuals 39 24637.4 631.73
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on number of reproductive apices: daily minimum ph
lm3 <- lm(apices.repro ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = apices.repro ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 331.3256 -39.4299 0.1521
summary (lm3)
##
## Call:
## lm(formula = apices.repro ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.474 -18.299 -7.498 13.234 61.638
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 331.3256 280.8157 1.180 0.245
## daily.min.ph -39.4299 35.8585 -1.100 0.278
## salinity 0.1521 0.5361 0.284 0.778
##
## Residual standard error: 25.21 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03394, Adjusted R-squared: -0.0156
## F-statistic: 0.6852 on 2 and 39 DF, p-value: 0.51
anova (lm3)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 819.4 819.43 1.2898 0.2630
## salinity 1 51.1 51.12 0.0805 0.7782
## Residuals 39 24776.6 635.30
plot (lm3)
Effect salinity and pH on number of reproductive apices: daily maximum ph
lm4 <- lm(apices.repro ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = apices.repro ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 98.2804 -9.3497 0.1899
summary (lm4)
##
## Call:
## lm(formula = apices.repro ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.121 -18.912 -8.233 12.550 71.373
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 98.2804 165.5398 0.594 0.556
## daily.max.ph -9.3497 20.4605 -0.457 0.650
## salinity 0.1899 0.5425 0.350 0.728
##
## Residual standard error: 25.52 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.009298, Adjusted R-squared: -0.04151
## F-statistic: 0.183 on 2 and 39 DF, p-value: 0.8335
anova (lm4)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 158.6 158.58 0.2434 0.6245
## salinity 1 79.9 79.88 0.1226 0.7281
## Residuals 39 25408.7 651.50
plot (lm4)
Effect of salinity and pH on number of reproductive apices: daily ph range
lm5 <- lm(apices.repro ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 22.7620 0.5634 0.2097
summary (lm5)
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.670 -17.992 -8.053 8.548 73.528
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.7620 13.3110 1.710 0.0952 .
## daily.ph.range 0.5634 3.5430 0.159 0.8745
## salinity 0.2097 0.5418 0.387 0.7008
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 25.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.004639, Adjusted R-squared: -0.04641
## F-statistic: 0.09088 on 2 and 39 DF, p-value: 0.9133
anova (lm5)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 20.9 20.93 0.0320 0.8590
## salinity 1 98.0 98.04 0.1498 0.7008
## Residuals 39 25528.2 654.57
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on number of reproductive apices: daily median ph
lm6 <- lm(apices.repro ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = apices.repro ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 206.0311 -23.1125 0.1857
summary (lm6)
##
## Call:
## lm(formula = apices.repro ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.475 -18.344 -8.637 12.881 68.719
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 206.0311 231.0796 0.892 0.378
## daily.med.ph -23.1125 29.1130 -0.794 0.432
## salinity 0.1857 0.5382 0.345 0.732
##
## Residual standard error: 25.39 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01983, Adjusted R-squared: -0.03043
## F-statistic: 0.3946 on 2 and 39 DF, p-value: 0.6766
anova (lm6)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 431.9 431.91 0.6701 0.4180
## salinity 1 76.8 76.76 0.1191 0.7319
## Residuals 39 25138.5 644.58
plot (lm6)
Effect salinity and pH on number of reproductive apices: number of days with a daily minimun ph less than 7
lm7 <- lm(apices.repro ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 27.89017 -0.58311 0.07788
summary (lm7)
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.418 -20.617 -4.852 8.224 70.938
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.89017 15.03132 1.855 0.0711 .
## min.daily.ph.lt7 -0.58311 0.83378 -0.699 0.4885
## salinity 0.07788 0.57211 0.136 0.8924
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 25.43 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01633, Adjusted R-squared: -0.03412
## F-statistic: 0.3237 on 2 and 39 DF, p-value: 0.7254
anova (lm7)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 406.8 406.81 0.6289 0.4326
## salinity 1 12.0 11.99 0.0185 0.8924
## Residuals 39 25228.3 646.88
plot (lm7)
Effect salinity and pH on number of reproductive apices: number of days with a daily minimun ph less than 8
lm7 <- lm(apices.repro ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 22.24009 0.02724 0.21487
summary (lm7)
##
## Call:
## lm(formula = apices.repro ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.286 -18.223 -8.417 8.818 73.277
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.24009 14.25746 1.560 0.127
## min.daily.ph.lt8 0.02724 0.22014 0.124 0.902
## salinity 0.21487 0.54126 0.397 0.694
##
## Residual standard error: 25.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.004384, Adjusted R-squared: -0.04667
## F-statistic: 0.08586 on 2 and 39 DF, p-value: 0.9179
anova (lm7)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 9.3 9.25 0.0141 0.9060
## salinity 1 103.2 103.18 0.1576 0.6935
## Residuals 39 25534.7 654.74
plot (lm7)
Effect salinity and pH on number of reproductive apices: number of days with a daily maximum ph less than 7
lm10 <- lm(apices.repro ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = apices.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 27.89017 -0.58311 0.07788
summary (lm10)
##
## Call:
## lm(formula = apices.repro ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.418 -20.617 -4.852 8.224 70.938
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.89017 15.03132 1.855 0.0711 .
## max.daily.ph.lt7 -0.58311 0.83378 -0.699 0.4885
## salinity 0.07788 0.57211 0.136 0.8924
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 25.43 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01633, Adjusted R-squared: -0.03412
## F-statistic: 0.3237 on 2 and 39 DF, p-value: 0.7254
anova (lm10)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 406.8 406.81 0.6289 0.4326
## salinity 1 12.0 11.99 0.0185 0.8924
## Residuals 39 25228.3 646.88
plot (lm10)
Effect salinity and pH on number of reproductive apices: number of days with a daily ph range greater than 0.5
lm13 <- lm(apices.repro ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 27.9119 -0.4607 0.1088
summary (lm13)
##
## Call:
## lm(formula = apices.repro ~ daily.ph.range.gt0.5 + salinity,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.748 -19.974 -6.129 12.522 70.835
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.9119 15.0476 1.855 0.0712 .
## daily.ph.range.gt0.5 -0.4607 0.6590 -0.699 0.4887
## salinity 0.1088 0.5586 0.195 0.8465
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 25.43 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.01632, Adjusted R-squared: -0.03413
## F-statistic: 0.3235 on 2 and 39 DF, p-value: 0.7255
anova (lm13)
## Analysis of Variance Table
##
## Response: apices.repro
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 394.0 394.00 0.6091 0.4399
## salinity 1 24.6 24.56 0.0380 0.8465
## Residuals 39 25228.6 646.89
plot (lm13)
####Q2.4 Effects of salinity and pH on percent of reproductive apices#### Different salinity terms first
Effect of pH and salinity on percent reproductive apices
lm1 <- lm(perc.ra ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = perc.ra ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -478.486 42.272 62.740 -5.311
summary (lm1)
##
## Call:
## lm(formula = perc.ra ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.412 -11.804 -4.422 11.214 36.928
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -478.486 640.424 -0.747 0.460
## salinity 42.272 28.618 1.477 0.148
## ph 62.740 80.959 0.775 0.443
## salinity:ph -5.311 3.620 -1.467 0.151
##
## Residual standard error: 16.53 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2194, Adjusted R-squared: 0.1578
## F-statistic: 3.561 on 3 and 38 DF, p-value: 0.02297
anova (lm1)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 308.9 308.89 1.1305 0.29439
## ph 1 2022.2 2022.16 7.4006 0.00978 **
## salinity:ph 1 588.1 588.08 2.1522 0.15059
## Residuals 38 10383.3 273.24
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on percent reproductive apices, interaction term removed
lm2 <- lm(perc.ra ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = perc.ra ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 433.6637 0.2922 -52.5933
summary (lm2)
##
## Call:
## lm(formula = perc.ra ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.974 -13.814 -1.335 11.569 36.427
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 433.6637 155.7275 2.785 0.00822 **
## salinity 0.2922 0.3560 0.821 0.41679
## ph -52.5933 19.6164 -2.681 0.01070 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.77 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1752, Adjusted R-squared: 0.1329
## F-statistic: 4.143 on 2 and 39 DF, p-value: 0.02336
anova (lm2)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 308.9 308.89 1.0980 0.3012
## ph 1 2022.2 2022.16 7.1882 0.0107 *
## Residuals 39 10971.3 281.32
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on percent reproductive apices: daily minimum salinity
lm3 <- lm(perc.ra ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = perc.ra ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 441.4732 0.0805 -52.8976
summary (lm3)
##
## Call:
## lm(formula = perc.ra ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.520 -12.654 -1.376 13.253 36.083
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 441.4732 164.1576 2.689 0.0108 *
## daily.min.sal 0.0805 0.3535 0.228 0.8211
## ph -52.8976 20.7029 -2.555 0.0150 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.37 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1582, Adjusted R-squared: 0.1115
## F-statistic: 3.383 on 2 and 36 DF, p-value: 0.04503
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 71.9 71.86 0.2383 0.62841
## ph 1 1968.9 1968.87 6.5284 0.01499 *
## Residuals 36 10857.0 301.58
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on percent reproductive apices: daily maximum salinity
lm4 <- lm(perc.ra ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = perc.ra ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 369.0251 0.8799 -46.4712
summary (lm4)
##
## Call:
## lm(formula = perc.ra ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.904 -12.659 -1.552 10.754 33.201
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 369.0251 162.4056 2.272 0.0291 *
## daily.max.sal 0.8799 0.5058 1.740 0.0905 .
## ph -46.4712 20.1904 -2.302 0.0272 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.69 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2224, Adjusted R-squared: 0.1792
## F-statistic: 5.148 on 2 and 36 DF, p-value: 0.01081
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 1392.3 1392.3 4.9976 0.03167 *
## ph 1 1475.9 1475.9 5.2976 0.02725 *
## Residuals 36 10029.5 278.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on percent reproductive apices: daily salinity range
lm5 <- lm(perc.ra ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 421.3228 0.9192 -50.8287
summary (lm5)
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -30.008 -14.543 -2.331 12.162 29.795
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 421.3228 157.5481 2.674 0.0112 *
## daily.sal.range 0.9192 0.5596 1.643 0.1092
## ph -50.8287 19.9407 -2.549 0.0152 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.76 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2158, Adjusted R-squared: 0.1722
## F-statistic: 4.953 on 2 and 36 DF, p-value: 0.01258
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 957.7 957.68 3.4086 0.07309 .
## ph 1 1825.5 1825.50 6.4974 0.01521 *
## Residuals 36 10114.6 280.96
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on percent reproductive apices: daily median salinity
lm6 <- lm(perc.ra ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = perc.ra ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 417.6358 0.3465 -50.6672
summary (lm6)
##
## Call:
## lm(formula = perc.ra ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.135 -13.956 0.236 11.448 35.971
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 417.6358 163.7048 2.551 0.0151 *
## daily.med.sal 0.3465 0.3736 0.927 0.3599
## ph -50.6672 20.5780 -2.462 0.0187 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.17 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1767, Adjusted R-squared: 0.1309
## F-statistic: 3.863 on 2 and 36 DF, p-value: 0.03021
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 490.6 490.59 1.6632 0.20540
## ph 1 1788.2 1788.24 6.0624 0.01873 *
## Residuals 36 10618.9 294.97
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on percent reproductive apices: number of days with a daily minimun salinity less than 5
lm7 <- lm(perc.ra ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 323.5167 -0.4219 -37.1483
summary (lm7)
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.184 -12.228 -2.209 10.646 30.847
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 323.5167 158.6635 2.039 0.0483 *
## min.daily.sal.lt5 -0.4219 0.1964 -2.149 0.0379 *
## ph -37.1483 20.2145 -1.838 0.0737 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2498, Adjusted R-squared: 0.2113
## F-statistic: 6.493 on 2 and 39 DF, p-value: 0.003681
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 2458.7 2458.71 9.6086 0.003587 **
## ph 1 864.2 864.16 3.3772 0.073733 .
## Residuals 39 9979.5 255.88
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on percent reproductive apices: number of days with a daily minimun salinity less than 10
lm8 <- lm(perc.ra ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 291.1214 -0.4531 -32.8332
summary (lm8)
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.053 -12.515 -2.228 10.561 29.551
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 291.1214 163.9681 1.775 0.0836 .
## min.daily.sal.lt10 -0.4531 0.2067 -2.191 0.0345 *
## ph -32.8332 20.9483 -1.567 0.1251
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.253, Adjusted R-squared: 0.2147
## F-statistic: 6.604 on 2 and 39 DF, p-value: 0.003388
anova (lm8)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 2739.3 2739.30 10.7508 0.002198 **
## ph 1 625.9 625.93 2.4566 0.125113
## Residuals 39 9937.2 254.80
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on percent reproductive apices: number of days with a daily minimun salinity less than 15
lm9 <- lm(perc.ra ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 340.52 -0.43 -39.05
summary (lm9)
##
## Call:
## lm(formula = perc.ra ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.801 -11.066 -2.693 9.769 33.113
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 340.5213 154.7222 2.201 0.0337 *
## min.daily.sal.lt15 -0.4300 0.1929 -2.228 0.0317 *
## ph -39.0529 19.7340 -1.979 0.0549 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.93 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2557, Adjusted R-squared: 0.2176
## F-statistic: 6.701 on 2 and 39 DF, p-value: 0.003152
anova (lm9)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 2407.9 2407.89 9.4853 0.003785 **
## ph 1 994.2 994.17 3.9163 0.054912 .
## Residuals 39 9900.3 253.85
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on percent reproductive apices: number of days with a daily maximum salinity less than 5
lm10 <- lm(perc.ra ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 333.0821 -0.3366 -38.4611
summary (lm10)
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.148 -11.956 -0.988 10.259 31.930
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 333.0821 166.9504 1.995 0.0531 .
## max.daily.sal.lt5 -0.3366 0.2059 -1.634 0.1102
## ph -38.4611 21.2941 -1.806 0.0786 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.37 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2148, Adjusted R-squared: 0.1745
## F-statistic: 5.334 on 2 and 39 DF, p-value: 0.008961
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 1983.3 1983.33 7.4052 0.009668 **
## ph 1 873.7 873.74 3.2623 0.078611 .
## Residuals 39 10445.3 267.83
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on percent reproductive apices: number of days with a daily maximum salinity less than 10
lm11 <- lm(perc.ra ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 320.6320 -0.3753 -36.8125
summary (lm11)
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.353 -12.031 -1.177 10.414 31.401
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 320.6320 165.5879 1.936 0.0601 .
## max.daily.sal.lt10 -0.3753 0.2057 -1.825 0.0757 .
## ph -36.8125 21.1239 -1.743 0.0893 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.24 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.227, Adjusted R-squared: 0.1873
## F-statistic: 5.726 on 2 and 39 DF, p-value: 0.006602
anova (lm11)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 2218.6 2218.64 8.4146 0.006089 **
## ph 1 800.8 800.76 3.0370 0.089267 .
## Residuals 39 10283.0 263.67
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on percent reproductive apices: number of days with a daily maximum salinity less than 15
lm12 <- lm(perc.ra ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 286.7255 -0.4569 -32.3435
summary (lm12)
##
## Call:
## lm(formula = perc.ra ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.406 -13.088 -1.584 9.886 30.076
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 286.7255 164.4659 1.743 0.0891 .
## max.daily.sal.lt15 -0.4569 0.2068 -2.210 0.0330 *
## ph -32.3435 20.9984 -1.540 0.1316
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.95 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2544, Adjusted R-squared: 0.2161
## F-statistic: 6.652 on 2 and 39 DF, p-value: 0.003268
anova (lm12)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 2780.2 2780.22 10.9317 0.002036 **
## ph 1 603.4 603.39 2.3725 0.131566
## Residuals 39 9918.8 254.33
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on percent reproductive apices: number of days with a daily salinity range greater than 10
lm13 <- lm(perc.ra ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 330.0779 -0.4001 -37.9139
summary (lm13)
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.814 -11.445 -1.621 10.476 30.728
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 330.0779 161.8796 2.039 0.0483 *
## daily.sal.range.gt10 -0.4001 0.2104 -1.902 0.0646 .
## ph -37.9139 20.6567 -1.835 0.0741 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.18 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2322, Adjusted R-squared: 0.1928
## F-statistic: 5.897 on 2 and 39 DF, p-value: 0.005785
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 2206.6 2206.61 8.4259 0.006058 **
## ph 1 882.2 882.24 3.3688 0.074076 .
## Residuals 39 10213.5 261.89
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on percent reproductive apices: number of days with a daily salinity range greater than 5
lm14 <- lm(perc.ra ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 388.0782 -0.5002 -44.8293
summary (lm14)
##
## Call:
## lm(formula = perc.ra ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.441 -11.295 -1.957 11.923 32.284
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 388.0782 144.2083 2.691 0.01043 *
## daily.sal.range.gt5 -0.5002 0.1817 -2.753 0.00892 **
## ph -44.8293 18.3421 -2.444 0.01915 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 15.48 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2975, Adjusted R-squared: 0.2615
## F-statistic: 8.257 on 2 and 39 DF, p-value: 0.001023
anova (lm14)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 2525.9 2525.91 10.5414 0.002402 **
## ph 1 1431.4 1431.35 5.9735 0.019148 *
## Residuals 39 9345.1 239.62
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent reproductive apices: daily minimum ph
lm3 <- lm(perc.ra ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = perc.ra ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 334.246 -40.580 0.308
summary (lm3)
##
## Call:
## lm(formula = perc.ra ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.10 -13.45 -3.59 13.35 38.34
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 334.2456 196.8893 1.698 0.0975 .
## daily.min.ph -40.5802 25.1416 -1.614 0.1146
## salinity 0.3080 0.3759 0.819 0.4176
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.67 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08438, Adjusted R-squared: 0.03743
## F-statistic: 1.797 on 2 and 39 DF, p-value: 0.1792
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 912.9 912.86 2.9230 0.09527 .
## salinity 1 209.6 209.64 0.6713 0.41759
## Residuals 39 12179.9 312.30
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on percent reproductive apices: daily maximum ph
lm4 <- lm(perc.ra ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = perc.ra ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 307.3058 -36.0220 0.2789
summary (lm4)
##
## Call:
## lm(formula = perc.ra ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.474 -13.973 0.021 9.756 33.263
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 307.3058 108.7918 2.825 0.00742 **
## daily.max.ph -36.0220 13.4465 -2.679 0.01076 *
## salinity 0.2789 0.3565 0.782 0.43882
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.77 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.175, Adjusted R-squared: 0.1327
## F-statistic: 4.137 on 2 and 39 DF, p-value: 0.02347
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 2156.1 2156.11 7.6624 0.008581 **
## salinity 1 172.2 172.16 0.6118 0.438821
## Residuals 39 10974.1 281.39
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on percent reproductive apices: daily ph range
lm5 <- lm(perc.ra ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 15.8531 4.5974 0.3362
summary (lm5)
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.779 -12.518 -4.952 11.551 37.380
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.8531 9.0848 1.745 0.0889 .
## daily.ph.range 4.5974 2.4181 1.901 0.0647 .
## salinity 0.3362 0.3698 0.909 0.3688
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.46 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1061, Adjusted R-squared: 0.06023
## F-statistic: 2.314 on 2 and 39 DF, p-value: 0.1123
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 1159 1159.00 3.8012 0.05843 .
## salinity 1 252 252.05 0.8266 0.36883
## Residuals 39 11891 304.91
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on percent reproductive apices: daily median ph
lm6 <- lm(perc.ra ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = perc.ra ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 408.1510 -49.3856 0.3112
summary (lm6)
##
## Call:
## lm(formula = perc.ra ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.700 -14.398 -1.327 11.557 36.133
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 408.1510 153.8186 2.653 0.0115 *
## daily.med.ph -49.3856 19.3791 -2.548 0.0149 *
## salinity 0.3112 0.3582 0.869 0.3903
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.9 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1627, Adjusted R-squared: 0.1197
## F-statistic: 3.788 on 2 and 39 DF, p-value: 0.03138
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 1948.2 1948.20 6.8212 0.01272 *
## salinity 1 215.5 215.52 0.7546 0.39034
## Residuals 39 11138.7 285.61
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on percent reproductive apices: number of days with a daily minimun ph less than 7
lm7 <- lm(perc.ra ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 15.6988 0.1280 0.4016
summary (lm7)
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.45 -12.73 -6.12 12.23 37.90
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.6988 10.7810 1.456 0.153
## min.daily.ph.lt7 0.1280 0.5980 0.214 0.832
## salinity 0.4016 0.4103 0.979 0.334
##
## Residual standard error: 18.24 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.02437, Adjusted R-squared: -0.02567
## F-statistic: 0.487 on 2 and 39 DF, p-value: 0.6181
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 5.3 5.33 0.016 0.8999
## salinity 1 318.8 318.81 0.958 0.3337
## Residuals 39 12978.2 332.78
plot (lm7)
Effect salinity and pH on percent reproductive apices: number of days with a daily minimun ph less than 8
lm7 <- lm(perc.ra ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 24.7338 -0.3388 0.3616
summary (lm7)
##
## Call:
## lm(formula = perc.ra ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.807 -12.724 -3.747 7.644 40.377
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.7338 9.5442 2.592 0.0134 *
## min.daily.ph.lt8 -0.3388 0.1474 -2.299 0.0269 *
## salinity 0.3616 0.3623 0.998 0.3245
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.13 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1398, Adjusted R-squared: 0.09569
## F-statistic: 3.169 on 2 and 39 DF, p-value: 0.05305
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 1567.6 1567.57 5.3427 0.02618 *
## salinity 1 292.1 292.15 0.9957 0.32450
## Residuals 39 11442.7 293.40
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on percent reproductive apices: number of days with a daily maximum ph less than 7
lm10 <- lm(perc.ra ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = perc.ra ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 15.6988 0.1280 0.4016
summary (lm10)
##
## Call:
## lm(formula = perc.ra ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.45 -12.73 -6.12 12.23 37.90
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.6988 10.7810 1.456 0.153
## max.daily.ph.lt7 0.1280 0.5980 0.214 0.832
## salinity 0.4016 0.4103 0.979 0.334
##
## Residual standard error: 18.24 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.02437, Adjusted R-squared: -0.02567
## F-statistic: 0.487 on 2 and 39 DF, p-value: 0.6181
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 5.3 5.33 0.016 0.8999
## salinity 1 318.8 318.81 0.958 0.3337
## Residuals 39 12978.2 332.78
plot (lm10)
Effect salinity and pH on percent reproductive apices: number of days with a daily ph range greater than 0.5
lm13 <- lm(perc.ra ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 22.0641 -0.4818 0.2617
summary (lm13)
##
## Call:
## lm(formula = perc.ra ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.854 -15.196 -3.051 10.686 34.561
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 22.0641 10.6543 2.071 0.045 *
## daily.ph.range.gt0.5 -0.4818 0.4666 -1.033 0.308
## salinity 0.2617 0.3955 0.662 0.512
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 18.01 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04922, Adjusted R-squared: 0.0004577
## F-statistic: 1.009 on 2 and 39 DF, p-value: 0.3738
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.ra
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 512.7 512.71 1.5810 0.2161
## salinity 1 142.0 141.98 0.4378 0.5121
## Residuals 39 12647.7 324.30
plot (lm13)
####Q2.5 Effects of salinity and pH on number of oogonia#### Different salinity terms first
Effect of pH and salinity on number of oogonia
lm1 <- lm(avg.oog ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = avg.oog ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -80.464 14.797 11.439 -1.815
summary (lm1)
##
## Call:
## lm(formula = avg.oog ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.493 -13.627 -2.085 12.392 36.563
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -80.464 640.003 -0.126 0.901
## salinity 14.797 28.599 0.517 0.608
## ph 11.439 80.906 0.141 0.888
## salinity:ph -1.815 3.618 -0.502 0.619
##
## Residual standard error: 16.52 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1032, Adjusted R-squared: 0.0324
## F-statistic: 1.458 on 3 and 38 DF, p-value: 0.2414
anova (lm1)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 553.1 553.06 2.0267 0.1627
## ph 1 571.6 571.63 2.0948 0.1560
## salinity:ph 1 68.6 68.64 0.2515 0.6189
## Residuals 38 10369.6 272.88
plot (lm1)
Effect of pH and salinity on number of oogonia, interaction term removed
lm2 <- lm(avg.oog ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = avg.oog ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 231.1591 0.4551 -27.9628
summary (lm2)
##
## Call:
## lm(formula = avg.oog ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.261 -13.201 -2.266 13.031 37.308
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 231.1591 151.8971 1.522 0.136
## salinity 0.4551 0.3472 1.311 0.198
## ph -27.9628 19.1339 -1.461 0.152
##
## Residual standard error: 16.36 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09727, Adjusted R-squared: 0.05097
## F-statistic: 2.101 on 2 and 39 DF, p-value: 0.136
anova (lm2)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 553.1 553.06 2.0664 0.1586
## ph 1 571.6 571.63 2.1358 0.1519
## Residuals 39 10438.3 267.65
plot (lm2)
Effect and salinity and pH on number of oogonia: daily minimum salinity
lm3 <- lm(avg.oog ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = avg.oog ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 262.9507 0.3537 -31.6026
summary (lm3)
##
## Call:
## lm(formula = avg.oog ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.935 -13.485 -0.503 11.784 38.379
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 262.9507 154.1312 1.706 0.0966 .
## daily.min.sal 0.3537 0.3319 1.066 0.2937
## ph -31.6026 19.4384 -1.626 0.1127
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.31 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1038, Adjusted R-squared: 0.05405
## F-statistic: 2.086 on 2 and 36 DF, p-value: 0.139
anova (lm3)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 406.3 406.25 1.5280 0.2244
## ph 1 702.7 702.73 2.6432 0.1127
## Residuals 36 9571.3 265.87
plot (lm3)
Effect and salinity and pH on number of oogonia: daily maximum salinity
lm4 <- lm(avg.oog ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = avg.oog ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 246.2015 0.4579 -30.1017
summary (lm4)
##
## Call:
## lm(formula = avg.oog ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.825 -13.637 0.248 12.722 38.195
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 246.2015 159.2610 1.546 0.131
## daily.max.sal 0.4579 0.4960 0.923 0.362
## ph -30.1017 19.7994 -1.520 0.137
##
## Residual standard error: 16.37 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.09694, Adjusted R-squared: 0.04677
## F-statistic: 1.932 on 2 and 36 DF, p-value: 0.1595
anova (lm4)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 416.1 416.11 1.5532 0.2207
## ph 1 619.3 619.26 2.3114 0.1372
## Residuals 36 9644.9 267.91
plot (lm4)
Effect and salinity and pH on number of oogonia: daily salinity range
lm5 <- lm(avg.oog ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 297.2953 -0.3804 -34.7467
summary (lm5)
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.466 -13.697 -1.289 9.071 39.979
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 297.2953 154.6305 1.923 0.0625 .
## daily.sal.range -0.3804 0.5492 -0.693 0.4930
## ph -34.7467 19.5714 -1.775 0.0843 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.45 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.08772, Adjusted R-squared: 0.03703
## F-statistic: 1.731 on 2 and 36 DF, p-value: 0.1916
anova (lm5)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 83.8 83.75 0.3094 0.58146
## ph 1 853.1 853.08 3.1520 0.08429 .
## Residuals 36 9743.4 270.65
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on number of oogonia: daily median salinity
lm6 <- lm(avg.oog ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = avg.oog ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 252.613 0.404 -30.538
summary (lm6)
##
## Call:
## lm(formula = avg.oog ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.492 -13.263 -0.707 12.540 37.566
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 252.6126 155.0693 1.629 0.112
## daily.med.sal 0.4040 0.3538 1.142 0.261
## ph -30.5377 19.4925 -1.567 0.126
##
## Residual standard error: 16.27 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1079, Adjusted R-squared: 0.05831
## F-statistic: 2.176 on 2 and 36 DF, p-value: 0.1281
anova (lm6)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 502.5 502.49 1.8985 0.1767
## ph 1 649.6 649.60 2.4544 0.1259
## Residuals 36 9528.2 264.67
plot (lm6)
Effect of salinity and pH on number of oogonia: number of days with a daily minimun salinity less than 5
lm7 <- lm(avg.oog ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 299.0783 0.1348 -35.4148
summary (lm7)
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.852 -12.309 -3.513 8.763 41.217
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 299.0783 164.8852 1.814 0.0774 .
## min.daily.sal.lt5 0.1348 0.2041 0.660 0.5129
## ph -35.4148 21.0072 -1.686 0.0998 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.62 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06793, Adjusted R-squared: 0.02013
## F-statistic: 1.421 on 2 and 39 DF, p-value: 0.2537
anova (lm7)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 0.0 0.03 0.0001 0.99245
## ph 1 785.4 785.39 2.8421 0.09981 .
## Residuals 39 10777.5 276.35
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on number of oogonia: number of days with a daily minimun salinity less than 10
lm8 <- lm(avg.oog ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 274.30490 0.04525 -32.16061
summary (lm8)
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.499 -12.556 -3.840 8.498 40.567
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 274.30490 171.61644 1.598 0.118
## min.daily.sal.lt10 0.04525 0.21639 0.209 0.835
## ph -32.16061 21.92546 -1.467 0.150
##
## Residual standard error: 16.71 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.05856, Adjusted R-squared: 0.01028
## F-statistic: 1.213 on 2 and 39 DF, p-value: 0.3083
anova (lm8)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 76.6 76.57 0.2743 0.6034
## ph 1 600.5 600.55 2.1515 0.1504
## Residuals 39 10885.8 279.12
plot (lm8)
Effect of salinity and pH on number of oogonia: number of days with a daily minimun salinity less than 15
lm9 <- lm(avg.oog ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 237.3401 -0.0816 -27.2287
summary (lm9)
##
## Call:
## lm(formula = avg.oog ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.401 -13.844 -3.042 9.422 38.992
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 237.3401 161.9926 1.465 0.151
## min.daily.sal.lt15 -0.0816 0.2020 -0.404 0.688
## ph -27.2287 20.6614 -1.318 0.195
##
## Residual standard error: 16.68 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06143, Adjusted R-squared: 0.0133
## F-statistic: 1.276 on 2 and 39 DF, p-value: 0.2905
anova (lm9)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 227.0 227.02 0.8158 0.3719
## ph 1 483.3 483.29 1.7367 0.1952
## Residuals 39 10852.6 278.27
plot (lm9)
Effect of salinity and pH on number of oogonia: number of days with a daily maximum salinity less than 5
lm10 <- lm(avg.oog ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 316.4683 0.1658 -37.6761
summary (lm10)
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.862 -12.885 -3.534 8.911 41.524
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 316.4683 169.1659 1.871 0.0689 .
## max.daily.sal.lt5 0.1658 0.2087 0.795 0.4316
## ph -37.6761 21.5767 -1.746 0.0887 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07252, Adjusted R-squared: 0.02496
## F-statistic: 1.525 on 2 and 39 DF, p-value: 0.2304
anova (lm10)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 0.1 0.11 0.0004 0.98380
## ph 1 838.4 838.43 3.0490 0.08866 .
## Residuals 39 10724.4 274.98
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on number of oogonia: number of days with a daily maximum salinity less than 10
lm11 <- lm(avg.oog ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 314.4028 0.1613 -37.4123
summary (lm11)
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.823 -12.788 -4.155 8.948 41.526
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 314.4028 169.1950 1.858 0.0707 .
## max.daily.sal.lt10 0.1613 0.2102 0.767 0.4474
## ph -37.4123 21.5840 -1.733 0.0909 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07153, Adjusted R-squared: 0.02391
## F-statistic: 1.502 on 2 and 39 DF, p-value: 0.2352
anova (lm11)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 0.0 0.00 0.0000 0.99776
## ph 1 827.1 827.06 3.0044 0.09094 .
## Residuals 39 10735.9 275.28
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on number of oogonia: number of days with a daily maximum salinity less than 15
lm12 <- lm(avg.oog ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 309.778 0.143 -36.811
summary (lm12)
##
## Call:
## lm(formula = avg.oog ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.807 -12.427 -3.898 8.647 41.458
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 309.7778 171.4283 1.807 0.0785 .
## max.daily.sal.lt15 0.1430 0.2155 0.664 0.5108
## ph -36.8113 21.8873 -1.682 0.1006
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.62 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06803, Adjusted R-squared: 0.02023
## F-statistic: 1.423 on 2 and 39 DF, p-value: 0.2531
anova (lm12)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 5.0 4.99 0.0181 0.8938
## ph 1 781.6 781.60 2.8286 0.1006
## Residuals 39 10776.3 276.32
plot (lm12)
Effect of salinity and pH on number of oogonia: number of days with a daily salinity range greater than 10
lm13 <- lm(avg.oog ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 285.69779 0.09049 -33.67639
summary (lm13)
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.899 -12.612 -3.594 8.275 41.012
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 285.69779 166.84396 1.712 0.0948 .
## daily.sal.range.gt10 0.09049 0.21684 0.417 0.6787
## ph -33.67639 21.29015 -1.582 0.1218
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.68 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06169, Adjusted R-squared: 0.01358
## F-statistic: 1.282 on 2 and 39 DF, p-value: 0.2889
anova (lm13)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 17.3 17.31 0.0622 0.8043
## ph 1 696.1 696.05 2.5020 0.1218
## Residuals 39 10849.6 278.19
plot (lm13)
Effect of salinity and pH on number of oogonia: number of days with a daily salinity range greater than 5
lm14 <- lm(avg.oog ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 242.321 -0.127 -27.741
summary (lm14)
##
## Call:
## lm(formula = avg.oog ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.986 -14.151 -3.420 9.275 38.801
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 242.3206 154.8908 1.564 0.126
## daily.sal.range.gt5 -0.1270 0.1952 -0.651 0.519
## ph -27.7405 19.7008 -1.408 0.167
##
## Residual standard error: 16.63 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06763, Adjusted R-squared: 0.01982
## F-statistic: 1.414 on 2 and 39 DF, p-value: 0.2552
anova (lm14)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 233.9 233.93 0.8462 0.3633
## ph 1 548.1 548.09 1.9827 0.1670
## Residuals 39 10780.9 276.43
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on number of oogonia: daily minimum ph
lm3 <- lm(avg.oog ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = avg.oog ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## -177.312 23.883 0.535
summary (lm3)
##
## Call:
## lm(formula = avg.oog ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.923 -12.938 -1.797 8.245 37.646
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -177.3120 184.7826 -0.960 0.343
## daily.min.ph 23.8834 23.5957 1.012 0.318
## salinity 0.5350 0.3528 1.516 0.137
##
## Residual standard error: 16.59 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0722, Adjusted R-squared: 0.02462
## F-statistic: 1.518 on 2 and 39 DF, p-value: 0.2319
anova (lm3)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 202.3 202.27 0.7353 0.3964
## salinity 1 632.6 632.61 2.2997 0.1375
## Residuals 39 10728.1 275.08
plot (lm3)
Effect salinity and pH on number of oogonia: daily maximum ph
lm4 <- lm(avg.oog ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = avg.oog ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 162.1239 -18.9223 0.4486
summary (lm4)
##
## Call:
## lm(formula = avg.oog ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.008 -13.314 -3.066 13.262 36.416
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 162.1239 106.1756 1.527 0.135
## daily.max.ph -18.9223 13.1232 -1.442 0.157
## salinity 0.4486 0.3479 1.289 0.205
##
## Residual standard error: 16.37 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09602, Adjusted R-squared: 0.04966
## F-statistic: 2.071 on 2 and 39 DF, p-value: 0.1397
anova (lm4)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 664.7 664.67 2.4799 0.1234
## salinity 1 445.6 445.62 1.6626 0.2048
## Residuals 39 10452.7 268.02
plot (lm4)
Effect of salinity and pH on number of oogonia: daily ph range
lm5 <- lm(avg.oog ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 9.9197 -1.9376 0.5124
summary (lm5)
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.283 -14.154 -1.249 9.823 37.752
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.9197 8.6635 1.145 0.259
## daily.ph.range -1.9376 2.3060 -0.840 0.406
## salinity 0.5124 0.3527 1.453 0.154
##
## Residual standard error: 16.65 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.06476, Adjusted R-squared: 0.0168
## F-statistic: 1.35 on 2 and 39 DF, p-value: 0.271
anova (lm5)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 163.5 163.48 0.5896 0.4472
## salinity 1 585.3 585.34 2.1110 0.1542
## Residuals 39 10814.1 277.28
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on number of oogonia: daily median ph
lm6 <- lm(avg.oog ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = avg.oog ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 198.8468 -23.8915 0.4681
summary (lm6)
##
## Call:
## lm(formula = avg.oog ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.561 -12.381 -2.534 12.654 37.076
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 198.8468 149.8817 1.327 0.192
## daily.med.ph -23.8915 18.8831 -1.265 0.213
## salinity 0.4681 0.3491 1.341 0.188
##
## Residual standard error: 16.47 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08537, Adjusted R-squared: 0.03847
## F-statistic: 1.82 on 2 and 39 DF, p-value: 0.1755
anova (lm6)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 499.5 499.47 1.8419 0.1825
## salinity 1 487.7 487.69 1.7984 0.1877
## Residuals 39 10575.8 271.17
plot (lm6)
Effect salinity and pH on number of oogonia: number of days with a daily minimun ph less than 7
lm7 <- lm(avg.oog ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 4.7456 0.5555 0.6272
summary (lm7)
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.108 -13.143 -4.687 9.081 38.820
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.7456 9.7995 0.484 0.631
## min.daily.ph.lt7 0.5555 0.5436 1.022 0.313
## salinity 0.6272 0.3730 1.681 0.101
##
## Residual standard error: 16.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07267, Adjusted R-squared: 0.02511
## F-statistic: 1.528 on 2 and 39 DF, p-value: 0.2297
anova (lm7)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 62.9 62.90 0.2288 0.6351
## salinity 1 777.3 777.33 2.8273 0.1007
## Residuals 39 10722.7 274.94
plot (lm7)
Effect salinity and pH on number of oogonia: number of days with a daily minimun ph less than 8
lm7 <- lm(avg.oog ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 9.407150 0.004857 0.497566
summary (lm7)
##
## Call:
## lm(formula = avg.oog ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.173 -14.229 -2.328 10.337 38.564
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.407150 9.361852 1.005 0.321
## min.daily.ph.lt8 0.004857 0.144549 0.034 0.973
## salinity 0.497566 0.355405 1.400 0.169
##
## Residual standard error: 16.8 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.04786, Adjusted R-squared: -0.0009703
## F-statistic: 0.9801 on 2 and 39 DF, p-value: 0.3843
anova (lm7)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 0.1 0.08 0.0003 0.9869
## salinity 1 553.3 553.30 1.9600 0.1694
## Residuals 39 11009.6 282.30
plot (lm7)
Effect salinity and pH on number of oogonia: number of days with a daily maximum ph less than 7
lm10 <- lm(avg.oog ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = avg.oog ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 4.7456 0.5555 0.6272
summary (lm10)
##
## Call:
## lm(formula = avg.oog ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.108 -13.143 -4.687 9.081 38.820
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.7456 9.7995 0.484 0.631
## max.daily.ph.lt7 0.5555 0.5436 1.022 0.313
## salinity 0.6272 0.3730 1.681 0.101
##
## Residual standard error: 16.58 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07267, Adjusted R-squared: 0.02511
## F-statistic: 1.528 on 2 and 39 DF, p-value: 0.2297
anova (lm10)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 62.9 62.90 0.2288 0.6351
## salinity 1 777.3 777.33 2.8273 0.1007
## Residuals 39 10722.7 274.94
plot (lm10)
Effect salinity and pH on number of oogonia: number of days with a daily ph range greater than 0.5
lm13 <- lm(avg.oog ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 12.4835 -0.2711 0.4355
summary (lm13)
##
## Call:
## lm(formula = avg.oog ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -22.176 -13.484 -3.029 9.247 37.610
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.4835 9.8910 1.262 0.214
## daily.ph.range.gt0.5 -0.2711 0.4332 -0.626 0.535
## salinity 0.4355 0.3672 1.186 0.243
##
## Residual standard error: 16.72 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.0573, Adjusted R-squared: 0.008956
## F-statistic: 1.185 on 2 and 39 DF, p-value: 0.3164
anova (lm13)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 269.4 269.39 0.9638 0.3323
## salinity 1 393.2 393.17 1.4067 0.2428
## Residuals 39 10900.4 279.50
plot (lm13)
####Q2.6 Effects of salinity and pH on percent reproductive dry weight####
Different salinity terms first
Effect of pH and salinity on percent reproductive dry weight
lm1 <- lm(perc.rdw ~ salinity + ph + salinity:ph, data =all)
lm1
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph + salinity:ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph salinity:ph
## -448.732 36.384 58.083 -4.568
summary (lm1)
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph + salinity:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.236 -9.319 -2.697 6.940 32.511
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -448.732 494.558 -0.907 0.370
## salinity 36.384 22.100 1.646 0.108
## ph 58.083 62.519 0.929 0.359
## salinity:ph -4.568 2.796 -1.634 0.111
##
## Residual standard error: 12.77 on 38 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2373, Adjusted R-squared: 0.1771
## F-statistic: 3.941 on 3 and 38 DF, p-value: 0.01528
anova (lm1)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 255.6 255.57 1.5684 0.218092
## ph 1 1236.0 1236.03 7.5854 0.008979 **
## salinity:ph 1 435.1 435.07 2.6700 0.110516
## Residuals 38 6192.0 162.95
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm1)
Effect of pH and salinity on percent reproductive dry weight, interaction term removed
lm2 <- lm(perc.rdw ~ salinity + ph, data =all)
lm2
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph, data = all)
##
## Coefficients:
## (Intercept) salinity ph
## 335.8308 0.2759 -41.1184
summary (lm2)
##
## Call:
## lm(formula = perc.rdw ~ salinity + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.682 -10.710 -1.672 8.938 29.576
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 335.8308 121.0312 2.775 0.00844 **
## salinity 0.2759 0.2767 0.997 0.32477
## ph -41.1184 15.2459 -2.697 0.01028 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.04 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1837, Adjusted R-squared: 0.1419
## F-statistic: 4.389 on 2 and 39 DF, p-value: 0.01909
anova (lm2)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 255.6 255.57 1.5040 0.22741
## ph 1 1236.0 1236.03 7.2739 0.01028 *
## Residuals 39 6627.1 169.93
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm2)
Effect and salinity and pH on percent reproductive dry weight: daily minimum salinity
lm3 <- lm(perc.rdw ~ daily.min.sal + ph, data =all)
lm3
##
## Call:
## lm(formula = perc.rdw ~ daily.min.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.min.sal ph
## 333.2979 0.1343 -40.2856
summary (lm3)
##
## Call:
## lm(formula = perc.rdw ~ daily.min.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.3862 -10.7402 0.1131 9.1262 29.4783
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 333.2979 128.3951 2.596 0.0136 *
## daily.min.sal 0.1343 0.2765 0.486 0.6302
## ph -40.2856 16.1927 -2.488 0.0176 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.58 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1577, Adjusted R-squared: 0.1109
## F-statistic: 3.369 on 2 and 36 DF, p-value: 0.04558
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.sal 1 101.2 101.16 0.5483 0.46381
## ph 1 1141.9 1141.94 6.1896 0.01762 *
## Residuals 36 6641.8 184.49
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect and salinity and pH on percent reproductive dry weight: daily maximum salinity
lm4 <- lm(perc.rdw ~ daily.max.sal + ph, data =all)
lm4
##
## Call:
## lm(formula = perc.rdw ~ daily.max.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.max.sal ph
## 272.8572 0.7851 -34.9213
summary (lm4)
##
## Call:
## lm(formula = perc.rdw ~ daily.max.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.040 -11.154 -1.103 7.397 27.603
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 272.8572 125.7619 2.170 0.0367 *
## daily.max.sal 0.7851 0.3917 2.004 0.0526 .
## ph -34.9213 15.6348 -2.234 0.0318 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.93 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.2373, Adjusted R-squared: 0.1949
## F-statistic: 5.599 on 2 and 36 DF, p-value: 0.007636
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.sal 1 1037.3 1037.28 6.2090 0.01745 *
## ph 1 833.4 833.43 4.9888 0.03182 *
## Residuals 36 6014.2 167.06
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect and salinity and pH on percent reproductive dry weight: daily salinity range
lm5 <- lm(perc.rdw ~ daily.sal.range + ph, data =all)
lm5
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range ph
## 324.495 0.641 -39.305
summary (lm5)
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -23.428 -10.336 -1.970 9.057 29.609
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 324.4955 124.5040 2.606 0.0132 *
## daily.sal.range 0.6410 0.4422 1.449 0.1559
## ph -39.3047 15.7584 -2.494 0.0174 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.25 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1989, Adjusted R-squared: 0.1544
## F-statistic: 4.469 on 2 and 36 DF, p-value: 0.01847
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range 1 476.7 476.66 2.7166 0.10801
## ph 1 1091.6 1091.57 6.2211 0.01735 *
## Residuals 36 6316.7 175.46
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm5)
Effect and salinity and pH on percent reproductive dry weight: daily median salinity
lm6 <- lm(perc.rdw ~ daily.med.sal + ph, data =all)
lm6
##
## Call:
## lm(formula = perc.rdw ~ daily.med.sal + ph, data = all)
##
## Coefficients:
## (Intercept) daily.med.sal ph
## 312.8853 0.3487 -38.3557
summary (lm6)
##
## Call:
## lm(formula = perc.rdw ~ daily.med.sal + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.627 -11.426 -1.264 8.287 29.021
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 312.8853 127.3707 2.456 0.0190 *
## daily.med.sal 0.3487 0.2906 1.200 0.2381
## ph -38.3557 16.0107 -2.396 0.0219 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.36 on 36 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1847, Adjusted R-squared: 0.1394
## F-statistic: 4.079 on 2 and 36 DF, p-value: 0.02532
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.sal 1 431.8 431.82 2.4183 0.12868
## ph 1 1024.8 1024.78 5.7390 0.02192 *
## Residuals 36 6428.3 178.56
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily minimun salinity less than 5
lm7 <- lm(perc.rdw ~ min.daily.sal.lt5 + ph, data =all)
lm7
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt5 ph
## 250.0097 -0.3383 -28.9270
summary (lm7)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.5399 -9.7236 -0.9837 8.3821 26.1684
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 250.0097 123.4027 2.026 0.0496 *
## min.daily.sal.lt5 -0.3383 0.1527 -2.215 0.0327 *
## ph -28.9270 15.7221 -1.840 0.0734 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.44 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2564, Adjusted R-squared: 0.2183
## F-statistic: 6.725 on 2 and 39 DF, p-value: 0.003095
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt5 1 1557.9 1557.93 10.0648 0.002944 **
## ph 1 524.0 523.99 3.3852 0.073404 .
## Residuals 39 6036.8 154.79
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily minimun salinity less than 10
lm8 <- lm(perc.rdw ~ min.daily.sal.lt10 + ph, data =all)
lm8
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt10 ph
## 223.5005 -0.3648 -25.3966
summary (lm8)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.8787 -10.0482 -0.0207 7.7860 25.2378
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 223.5005 127.4415 1.754 0.0873 .
## min.daily.sal.lt10 -0.3648 0.1607 -2.270 0.0288 *
## ph -25.3966 16.2817 -1.560 0.1269
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.41 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2606, Adjusted R-squared: 0.2227
## F-statistic: 6.873 on 2 and 39 DF, p-value: 0.002774
anova (lm8)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt10 1 1741.2 1741.24 11.312 0.001736 **
## ph 1 374.5 374.50 2.433 0.126881
## Residuals 39 6003.0 153.92
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm8)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily minimun salinity less than 15
lm9 <- lm(perc.rdw ~ min.daily.sal.lt15 +ph , data =all)
lm9
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) min.daily.sal.lt15 ph
## 266.9366 -0.3319 -30.8972
summary (lm9)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.5783 -9.6963 -0.4866 8.4746 28.9783
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 266.9366 120.8994 2.208 0.0332 *
## min.daily.sal.lt15 -0.3319 0.1508 -2.201 0.0337 *
## ph -30.8972 15.4201 -2.004 0.0521 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.45 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2554, Adjusted R-squared: 0.2172
## F-statistic: 6.69 on 2 and 39 DF, p-value: 0.003178
anova (lm9)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.sal.lt15 1 1451.4 1451.45 9.3643 0.003991 **
## ph 1 622.3 622.29 4.0148 0.052085 .
## Residuals 39 6045.0 155.00
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm9)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily maximum salinity less than 5
lm10 <- lm(perc.rdw ~ max.daily.sal.lt5 +ph, data =all)
lm10
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt5 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt5 ph
## 256.3701 -0.2736 -29.8080
summary (lm10)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.5199 -9.4098 0.5204 8.3655 26.5971
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 256.3701 129.8976 1.974 0.0555 .
## max.daily.sal.lt5 -0.2736 0.1602 -1.708 0.0957 .
## ph -29.8080 16.5681 -1.799 0.0797 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.73 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2211, Adjusted R-squared: 0.1812
## F-statistic: 5.536 on 2 and 39 DF, p-value: 0.007648
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt5 1 1270.5 1270.51 7.8360 0.007922 **
## ph 1 524.8 524.81 3.2368 0.079742 .
## Residuals 39 6323.4 162.14
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm10)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily maximum salinity less than 10
lm11 <- lm(perc.rdw ~ max.daily.sal.lt10 +ph, data =all)
lm11
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt10 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt10 ph
## 246.7269 -0.3037 -28.5305
summary (lm11)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.6832 -9.7477 0.5776 8.1694 26.3317
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 246.7269 128.7984 1.916 0.0628 .
## max.daily.sal.lt10 -0.3037 0.1600 -1.898 0.0651 .
## ph -28.5305 16.4307 -1.736 0.0904 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.63 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2337, Adjusted R-squared: 0.1944
## F-statistic: 5.947 on 2 and 39 DF, p-value: 0.005569
anova (lm11)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt10 1 1416.4 1416.38 8.8789 0.004945 **
## ph 1 481.0 480.98 3.0151 0.090385 .
## Residuals 39 6221.3 159.52
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm11)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily maximum salinity less than 15
lm12 <- lm(perc.rdw ~ max.daily.sal.lt15 +ph, data =all)
lm12
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt15 + ph, data = all)
##
## Coefficients:
## (Intercept) max.daily.sal.lt15 ph
## 219.8004 -0.3683 -24.9812
summary (lm12)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.sal.lt15 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.9163 -10.4790 0.4957 7.3708 25.7096
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 219.8004 127.7988 1.720 0.0934 .
## max.daily.sal.lt15 -0.3683 0.1607 -2.292 0.0274 *
## ph -24.9812 16.3169 -1.531 0.1338
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.39 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2623, Adjusted R-squared: 0.2245
## F-statistic: 6.934 on 2 and 39 DF, p-value: 0.002652
anova (lm12)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.sal.lt15 1 1769.7 1769.66 11.524 0.001591 **
## ph 1 360.0 359.96 2.344 0.133840
## Residuals 39 5989.1 153.57
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm12)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily salinity range greater than 10
lm13 <- lm(perc.rdw ~ daily.sal.range.gt10 +ph, data =all)
lm13
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt10 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt10 ph
## 255.7139 -0.3193 -29.5996
summary (lm13)
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt10 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.1191 -9.8037 0.2871 7.9345 25.6779
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 255.7139 126.0509 2.029 0.0494 *
## daily.sal.range.gt10 -0.3193 0.1638 -1.949 0.0585 .
## ph -29.5996 16.0847 -1.840 0.0734 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.6 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2372, Adjusted R-squared: 0.1981
## F-statistic: 6.064 on 2 and 39 DF, p-value: 0.00509
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt10 1 1388.2 1388.21 8.7425 0.005255 **
## ph 1 537.7 537.73 3.3864 0.073354 .
## Residuals 39 6192.8 158.79
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm13)
Effect of salinity and pH on percent reproductive dry weight: number of days with a daily salinity range greater than 5
lm14 <- lm(perc.rdw ~ daily.sal.range.gt5 +ph, data =all)
lm14
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt5 + ph, data = all)
##
## Coefficients:
## (Intercept) daily.sal.range.gt5 ph
## 300.6738 -0.4098 -34.9266
summary (lm14)
##
## Call:
## lm(formula = perc.rdw ~ daily.sal.range.gt5 + ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.0547 -7.2659 -0.3372 6.3774 28.7589
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 300.6738 111.4108 2.699 0.01023 *
## daily.sal.range.gt5 -0.4098 0.1404 -2.919 0.00581 **
## ph -34.9266 14.1705 -2.465 0.01822 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.96 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.313, Adjusted R-squared: 0.2777
## F-statistic: 8.883 on 2 and 39 DF, p-value: 0.0006622
anova (lm14)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.sal.range.gt5 1 1672.1 1672.12 11.6915 0.001484 **
## ph 1 868.8 868.83 6.0749 0.018221 *
## Residuals 39 5577.8 143.02
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm14)
Different pH terms
Data for pH: ph (median pH), daily.min.ph (daily minimum pH), daily.max.ph (daily maximum pH), daily.ph.range (daily pH range), daily.med.ph (daily median pH), min.daily.ph.lt7/8 (number of days with a daily minimum pH less than 7 and 8), max.daily.ph.lt7 (number of days with a daily maximum pH less than 7), and daily.ph.range.gt0.5 (number of days with a daily pH range greater than 0.5)
Effect salinity and pH on percent reproductive dry weight: daily minimum ph
lm3 <- lm(perc.rdw ~ daily.min.ph + salinity, data =all)
lm3
##
## Call:
## lm(formula = perc.rdw ~ daily.min.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.min.ph salinity
## 272.2977 -33.5408 0.2854
summary (lm3)
##
## Call:
## lm(formula = perc.rdw ~ daily.min.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -19.681 -10.521 -3.440 7.482 31.217
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 272.2977 152.5033 1.786 0.0820 .
## daily.min.ph -33.5408 19.4738 -1.722 0.0929 .
## salinity 0.2854 0.2911 0.980 0.3330
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.69 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09994, Adjusted R-squared: 0.05378
## F-statistic: 2.165 on 2 and 39 DF, p-value: 0.1283
anova (lm3)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.min.ph 1 631.3 631.32 3.3694 0.07405 .
## salinity 1 180.1 180.08 0.9611 0.33295
## Residuals 39 7307.3 187.37
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm3)
Effect salinity and pH on percent reproductive dry weight: daily maximum ph
lm4 <- lm(perc.rdw ~ daily.max.ph + salinity, data =all)
lm4
##
## Call:
## lm(formula = perc.rdw ~ daily.max.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.max.ph salinity
## 261.2038 -31.1587 0.2578
summary (lm4)
##
## Call:
## lm(formula = perc.rdw ~ daily.max.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.0859 -11.8498 -0.3128 8.1814 26.9520
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 261.2038 82.7702 3.156 0.00308 **
## daily.max.ph -31.1587 10.2303 -3.046 0.00415 **
## salinity 0.2578 0.2712 0.950 0.34773
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.76 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.2176, Adjusted R-squared: 0.1775
## F-statistic: 5.423 on 2 and 39 DF, p-value: 0.008357
anova (lm4)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.max.ph 1 1619.4 1619.35 9.9422 0.003104 **
## salinity 1 147.1 147.14 0.9034 0.347735
## Residuals 39 6352.2 162.88
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm4)
Effect of salinity and pH on percent reproductive dry weight: daily ph range
lm5 <- lm(perc.rdw ~ daily.ph.range + salinity, data =all)
lm5
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range salinity
## 9.2997 3.0066 0.3149
summary (lm5)
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.949 -10.018 -5.088 6.754 32.916
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.2997 7.1626 1.298 0.202
## daily.ph.range 3.0066 1.9065 1.577 0.123
## salinity 0.3149 0.2916 1.080 0.287
##
## Residual standard error: 13.77 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.08954, Adjusted R-squared: 0.04285
## F-statistic: 1.918 on 2 and 39 DF, p-value: 0.1605
anova (lm5)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range 1 505.8 505.85 2.6689 0.1104
## salinity 1 221.1 221.10 1.1666 0.2867
## Residuals 39 7391.7 189.53
plot (lm5)
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
## Warning in sqrt(crit * p * (1 - hh)/hh): NaNs produced
Effect salinity and pH on percent reproductive dry weight: daily median ph
lm6 <- lm(perc.rdw ~ daily.med.ph + salinity, data =all)
lm6
##
## Call:
## lm(formula = perc.rdw ~ daily.med.ph + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.med.ph salinity
## 331.0367 -40.5227 0.2885
summary (lm6)
##
## Call:
## lm(formula = perc.rdw ~ daily.med.ph + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.634 -11.044 -1.021 7.528 29.388
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 331.0367 118.5317 2.793 0.00806 **
## daily.med.ph -40.5227 14.9334 -2.714 0.00986 **
## salinity 0.2885 0.2761 1.045 0.30250
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.02 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1853, Adjusted R-squared: 0.1435
## F-statistic: 4.435 on 2 and 39 DF, p-value: 0.01839
anova (lm6)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.med.ph 1 1319.2 1319.21 7.7785 0.008134 **
## salinity 1 185.2 185.17 1.0918 0.302499
## Residuals 39 6614.3 169.60
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily minimun ph less than 7
lm7 <- lm(perc.rdw ~ min.daily.ph.lt7 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt7 salinity
## 9.25986 0.07663 0.35603
summary (lm7)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.423 -10.019 -5.680 8.214 33.225
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.25986 8.38879 1.104 0.276
## min.daily.ph.lt7 0.07663 0.46532 0.165 0.870
## salinity 0.35603 0.31929 1.115 0.272
##
## Residual standard error: 14.19 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03215, Adjusted R-squared: -0.01748
## F-statistic: 0.6478 on 2 and 39 DF, p-value: 0.5287
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt7 1 10.5 10.516 0.0522 0.8205
## salinity 1 250.5 250.517 1.2434 0.2716
## Residuals 39 7857.7 201.479
plot (lm7)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily minimun ph less than 8
lm7 <- lm(perc.rdw ~ min.daily.ph.lt8 + salinity, data =all)
lm7
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt8 + salinity, data = all)
##
## Coefficients:
## (Intercept) min.daily.ph.lt8 salinity
## 16.6804 -0.2887 0.3295
summary (lm7)
##
## Call:
## lm(formula = perc.rdw ~ min.daily.ph.lt8 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -18.100 -9.229 -3.563 7.970 35.480
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 16.6804 7.3233 2.278 0.0283 *
## min.daily.ph.lt8 -0.2887 0.1131 -2.553 0.0147 *
## salinity 0.3295 0.2780 1.185 0.2432
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.14 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1702, Adjusted R-squared: 0.1277
## F-statistic: 4 on 2 and 39 DF, p-value: 0.0263
anova (lm7)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## min.daily.ph.lt8 1 1139.3 1139.28 6.5954 0.01417 *
## salinity 1 242.6 242.58 1.4043 0.24318
## Residuals 39 6736.8 172.74
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily maximum ph less than 7
lm10 <- lm(perc.rdw ~ max.daily.ph.lt7 + salinity, data =all)
lm10
##
## Call:
## lm(formula = perc.rdw ~ max.daily.ph.lt7 + salinity, data = all)
##
## Coefficients:
## (Intercept) max.daily.ph.lt7 salinity
## 9.25986 0.07663 0.35603
summary (lm10)
##
## Call:
## lm(formula = perc.rdw ~ max.daily.ph.lt7 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.423 -10.019 -5.680 8.214 33.225
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.25986 8.38879 1.104 0.276
## max.daily.ph.lt7 0.07663 0.46532 0.165 0.870
## salinity 0.35603 0.31929 1.115 0.272
##
## Residual standard error: 14.19 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.03215, Adjusted R-squared: -0.01748
## F-statistic: 0.6478 on 2 and 39 DF, p-value: 0.5287
anova (lm10)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## max.daily.ph.lt7 1 10.5 10.516 0.0522 0.8205
## salinity 1 250.5 250.517 1.2434 0.2716
## Residuals 39 7857.7 201.479
plot (lm10)
Effect salinity and pH on percent reproductive dry weight: number of days with a daily ph range greater than 0.5
lm13 <- lm(perc.rdw ~ daily.ph.range.gt0.5 +salinity, data =all)
lm13
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Coefficients:
## (Intercept) daily.ph.range.gt0.5 salinity
## 15.0827 -0.4726 0.2302
summary (lm13)
##
## Call:
## lm(formula = perc.rdw ~ daily.ph.range.gt0.5 + salinity, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -17.887 -12.072 -3.802 7.845 30.128
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.0827 8.2211 1.835 0.0742 .
## daily.ph.range.gt0.5 -0.4726 0.3600 -1.313 0.1970
## salinity 0.2302 0.3052 0.754 0.4552
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.9 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.07246, Adjusted R-squared: 0.02489
## F-statistic: 1.523 on 2 and 39 DF, p-value: 0.2307
anova (lm13)
## Analysis of Variance Table
##
## Response: perc.rdw
## Df Sum Sq Mean Sq F value Pr(>F)
## daily.ph.range.gt0.5 1 478.4 478.41 2.4777 0.1235
## salinity 1 109.9 109.86 0.5690 0.4552
## Residuals 39 7530.4 193.09
plot (lm13)
####Looking at water temperature#### Effect of water temperature and salinity on density
lm6 <- lm(no.fuc.q ~ salinity + water.temp + salinity:water.temp, data =all)
lm6
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + salinity:water.temp,
## data = all)
##
## Coefficients:
## (Intercept) salinity water.temp
## 181.8952 -10.0548 -11.9875
## salinity:water.temp
## 0.7372
summary (lm6)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + salinity:water.temp,
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -43.259 -17.661 -5.154 15.469 92.223
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 181.8952 76.6508 2.373 0.02110 *
## salinity -10.0548 3.1637 -3.178 0.00241 **
## water.temp -11.9875 5.3428 -2.244 0.02882 *
## salinity:water.temp 0.7372 0.2143 3.440 0.00111 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 27.62 on 56 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.4018, Adjusted R-squared: 0.3697
## F-statistic: 12.54 on 3 and 56 DF, p-value: 2.223e-06
anova (lm6)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 5719 5719.2 7.4966 0.008272 **
## water.temp 1 13944 13944.5 18.2780 7.499e-05 ***
## salinity:water.temp 1 9029 9028.8 11.8346 0.001105 **
## Residuals 56 42723 762.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm6)
Effect of water temperature, phand salinity on density
lm7 <- lm(no.fuc.q ~ salinity + water.temp +ph + salinity:water.temp:ph + salinity:ph + salinity:water.temp+ water.temp:ph, data =all)
lm7
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + ph + salinity:water.temp:ph +
## salinity:ph + salinity:water.temp + water.temp:ph, data = all)
##
## Coefficients:
## (Intercept) salinity water.temp
## 4553.12 -245.83 -351.33
## ph salinity:ph salinity:water.temp
## -554.50 29.93 17.87
## water.temp:ph salinity:water.temp:ph
## 42.94 -2.17
summary (lm7)
##
## Call:
## lm(formula = no.fuc.q ~ salinity + water.temp + ph + salinity:water.temp:ph +
## salinity:ph + salinity:water.temp + water.temp:ph, data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -50.408 -20.398 1.137 13.206 89.658
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4553.122 8043.785 0.566 0.575
## salinity -245.826 414.214 -0.593 0.556
## water.temp -351.327 510.722 -0.688 0.496
## ph -554.497 1022.306 -0.542 0.591
## salinity:ph 29.933 52.563 0.569 0.572
## salinity:water.temp 17.871 25.211 0.709 0.483
## water.temp:ph 42.940 64.903 0.662 0.512
## salinity:water.temp:ph -2.170 3.199 -0.678 0.502
##
## Residual standard error: 31.14 on 37 degrees of freedom
## (16 observations deleted due to missingness)
## Multiple R-squared: 0.4322, Adjusted R-squared: 0.3248
## F-statistic: 4.024 on 7 and 37 DF, p-value: 0.002287
anova (lm7)
## Analysis of Variance Table
##
## Response: no.fuc.q
## Df Sum Sq Mean Sq F value Pr(>F)
## salinity 1 12663 12663.2 13.0611 0.0008918 ***
## water.temp 1 5795 5794.5 5.9766 0.0193802 *
## ph 1 164 164.2 0.1693 0.6830988
## salinity:ph 1 3 3.3 0.0034 0.9539401
## salinity:water.temp 1 8233 8233.2 8.4919 0.0060212 **
## water.temp:ph 1 3 3.2 0.0033 0.9547002
## salinity:water.temp:ph 1 446 446.1 0.4601 0.5017849
## Residuals 37 35873 969.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (lm7)
####Trying splines#### Try a natural spline –> need to look into what this means
library (splines)
splinefit1 <- lm (avg.oog ~ ns(salinity, knot = median (salinity)) + ns(ph, knot = median(ph)), data = all)
summary (splinefit1)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, knot = median(salinity)) +
## ns(ph, knot = median(ph)), data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.261 -13.201 -2.266 13.031 37.308
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.15 10.26 2.256 0.0297 *
## ns(salinity, knot = median(salinity)) 15.40 11.75 1.311 0.1976
## ns(ph, knot = median(ph)) -27.20 18.61 -1.461 0.1519
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 16.36 on 39 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.09727, Adjusted R-squared: 0.05097
## F-statistic: 2.101 on 2 and 39 DF, p-value: 0.136
anova (splinefit1)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, knot = median(salinity)) 1 553.1 553.06 2.0664 0.1586
## ns(ph, knot = median(ph)) 1 571.6 571.63 2.1358 0.1519
## Residuals 39 10438.3 267.65
plot (splinefit1)
splinefit2 <- lm (avg.oog ~ ns(salinity, df = 2) + ns(ph, df =2), data = all)
summary (splinefit2)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, df = 2) + ns(ph, df = 2),
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.909 -13.709 -1.635 13.930 36.039
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 24.426 16.358 1.493 0.144
## ns(salinity, df = 2)1 7.008 20.509 0.342 0.734
## ns(salinity, df = 2)2 11.470 9.646 1.189 0.242
## ns(ph, df = 2)1 -20.315 23.659 -0.859 0.396
## ns(ph, df = 2)2 -21.082 15.239 -1.383 0.175
##
## Residual standard error: 16.64 on 37 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1139, Adjusted R-squared: 0.0181
## F-statistic: 1.189 on 4 and 37 DF, p-value: 0.3318
anova (splinefit2)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, df = 2) 2 673.3 336.64 1.2156 0.3081
## ns(ph, df = 2) 2 643.6 321.82 1.1621 0.3240
## Residuals 37 10246.0 276.92
plot (splinefit2)
splinefit3 <- lm (avg.oog ~ ns(salinity, df = 3) + ns(ph, df =3), data = all)
summary (splinefit3)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, df = 3) + ns(ph, df = 3),
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.875 -12.336 -3.305 14.067 34.085
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 20.085 18.568 1.082 0.287
## ns(salinity, df = 3)1 6.996 10.636 0.658 0.515
## ns(salinity, df = 3)2 1.537 27.445 0.056 0.956
## ns(salinity, df = 3)3 10.668 9.533 1.119 0.271
## ns(ph, df = 3)1 -13.127 12.557 -1.045 0.303
## ns(ph, df = 3)2 -1.991 31.625 -0.063 0.950
## ns(ph, df = 3)3 -15.021 17.203 -0.873 0.389
##
## Residual standard error: 16.95 on 35 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.13, Adjusted R-squared: -0.0191
## F-statistic: 0.8719 on 6 and 35 DF, p-value: 0.5252
anova (splinefit3)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, df = 3) 3 785.5 261.82 0.9110 0.4456
## ns(ph, df = 3) 3 718.1 239.38 0.8329 0.4849
## Residuals 35 10059.3 287.41
plot (splinefit3)
splinefit4 <- lm (avg.oog ~ ns(salinity, df = 2) + ns(ph, df =3), data = all)
summary (splinefit4)
##
## Call:
## lm(formula = avg.oog ~ ns(salinity, df = 2) + ns(ph, df = 3),
## data = all)
##
## Residuals:
## Min 1Q Median 3Q Max
## -21.486 -12.116 -3.504 13.560 34.275
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 19.132 17.744 1.078 0.288
## ns(salinity, df = 2)1 4.852 20.791 0.233 0.817
## ns(salinity, df = 2)2 11.387 9.695 1.174 0.248
## ns(ph, df = 3)1 -13.544 12.297 -1.101 0.278
## ns(ph, df = 3)2 -1.906 31.196 -0.061 0.952
## ns(ph, df = 3)3 -15.600 16.794 -0.929 0.359
##
## Residual standard error: 16.72 on 36 degrees of freedom
## (19 observations deleted due to missingness)
## Multiple R-squared: 0.1291, Adjusted R-squared: 0.008154
## F-statistic: 1.067 on 5 and 36 DF, p-value: 0.3945
anova (splinefit4)
## Analysis of Variance Table
##
## Response: avg.oog
## Df Sum Sq Mean Sq F value Pr(>F)
## ns(salinity, df = 2) 2 673.3 336.64 1.2035 0.3119
## ns(ph, df = 3) 3 819.6 273.21 0.9767 0.4145
## Residuals 36 10070.0 279.72
plot (splinefit4)